huawei-cloud-cce-kubernetes-event-analyzer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHuawei Cloud CCE Kubernetes Event Analyzer
华为云CCE Kubernetes事件分析器
Overview
概述
Query and analyze Kubernetes Events in Huawei Cloud CCE clusters to identify warnings, repeated failure patterns, affected resources, and useful diagnosis handoffs. The skill supports a current Event view through and a historical Event view through LTS.
kubectlArchitecture: dispatcher -> through external kubeconfig or for current Events / LogConfig discovery plus for historical Events -> filtering and grouping -> diagnosis handoff.
python3 scripts/huawei-cloud.pykubectlkubectl ccekubectl ccehcloud LTS ListLogsExecution Method: Invoke only the bundled dispatcher. Do not query Kubernetes Events with raw Python Kubernetes SDK calls, direct Kubernetes API calls, or ad hoc cloud commands. The implementation invokes internally: external kubeconfig access first, then the plugin fallback.
huawei_get_cce_eventskubectlkubectl cceRelated Skills:
- - Install
huawei-cloud-kubectl-cce-installerand thekubectlplugin required for cluster accesskubectl-cce - - CCE and cloud-resource metrics
huawei-cloud-cce-metric-analyzer
Capabilities:
- Query current Kubernetes Events across a cluster or in a namespace
- Read Events through external kubeconfig access or
kubectlkubectl cce - Query historical Event records from LTS within an explicit time window
- Filter and group Events by type, reason, namespace, resource, and timestamps
- Check the current status of supported resources referenced by Events
- Analyze a supplied current or historical Event result locally without another cloud request
- Identify repeated warning patterns and hand off evidence to diagnosis skills
Typical Use Cases:
- "List Warning events for this CCE cluster"
- "Find repeated FailedScheduling events in namespace default"
- "Query historical ImagePullBackOff events from LTS"
- "Analyze the top Kubernetes event reasons during an incident"
用于查询和分析华为云CCE集群中的Kubernetes Events,以识别警告、重复故障模式、受影响资源以及有用的诊断交接信息。本技能支持通过查看当前Events,以及通过LTS查看历史Events。
kubectl架构: 调度器 -> 通过外部kubeconfig调用或使用查询当前Events / 通过发现LogConfig并配合查询历史Events -> 过滤与分组 -> 诊断交接。
python3 scripts/huawei-cloud.pykubectlkubectl ccekubectl ccehcloud LTS ListLogs执行方式:仅调用随附的调度器。禁止使用原生Python Kubernetes SDK调用、直接Kubernetes API调用或临时云命令查询Kubernetes Events。的实现内部会调用:优先使用外部kubeconfig访问,兜底使用插件。
huawei_get_cce_eventskubectlkubectl cce相关技能:
- - 安装集群访问所需的
huawei-cloud-kubectl-cce-installer和kubectl插件kubectl-cce - - CCE及云资源指标分析
huawei-cloud-cce-metric-analyzer
功能:
- 查询整个集群或单个命名空间内的当前Kubernetes Events
- 通过外部kubeconfig访问或
kubectl读取Eventskubectl cce - 在指定时间窗口内从LTS查询历史Event记录
- 按类型、原因、命名空间、资源和时间戳对Events进行过滤和分组
- 检查Events引用的受支持资源的当前状态
- 无需额外云请求,本地分析提供的当前或历史Event结果
- 识别重复警告模式并将证据移交给诊断技能
典型使用场景:
- "列出该CCE集群的Warning事件"
- "查找default命名空间中重复的FailedScheduling事件"
- "从LTS查询历史ImagePullBackOff事件"
- "分析故障期间排名靠前的Kubernetes事件原因"
Prerequisites
前提条件
1. Runtime Dependencies
1. 运行时依赖
- Python 3.8+ for the dispatcher and result processing
- (KooCLI) for cluster lookup and temporary external kubeconfig generation
hcloud - for current Event reads
kubectl - when the cluster has no usable external endpoint; see kubectl-cce.md
kubectl-cce - LTS command support and the Cloud Native Log Collection add-on (
hcloud) with alog-agentEvent-to-LTSdefault-event.LogConfigreadshuawei_query_k8s_events_from_ltsthroughlogconfigs.logging.openvessel.io, then invokeskubectl cceusing the configured LTS IDs.hcloud LTS ListLogs
- 调度器与结果处理需要Python 3.8+
- 用于集群查询和临时外部kubeconfig生成的(KooCLI)
hcloud - 用于当前Event读取的
kubectl - 当集群没有可用外部端点时需要;参见kubectl-cce.md
kubectl-cce - 需要LTS命令支持,以及云原生日志采集插件(
hcloud)并配置了log-agent类型的Event-to-LTSdefault-event。LogConfig会通过huawei_query_k8s_events_from_lts读取kubectl cce,然后使用配置的LTS ID调用logconfigs.logging.openvessel.io。hcloud LTS ListLogs
2. Credential Configuration
2. 凭证配置
- External kubeconfig access uses hcloud credential priority: explicit tool parameters > local hcloud profile > environment variables.
- The fallback requires AK/SK and the target cluster's
kubectl ccefrom explicit tool parameters or environment variables; encrypted hcloud profile credentials cannot be reused by the plugin. Whenproject_idis available, the implementation passes it explicitly asproject_id.kubectl cce --project-id <project-id> - LTS queries require valid Huawei Cloud credentials and an authorized project.
Security Rules:
- Never print, persist, or hardcode AK/SK, security tokens, kubeconfig content, or temporary client credentials.
- Never use or
echo $HUAWEI_AKto inspect credentials.echo $HUAWEI_SK - Prefer a local hcloud profile for external kubeconfig access.
- Use least-privilege IAM identities and read-only Kubernetes RBAC permissions.
Optional Environment Fallback:
bash
export HUAWEI_AK=<your-ak>
export HUAWEI_SK=<your-sk>
export HUAWEI_REGION=cn-north-4
export HUAWEI_PROJECT_ID=<project-id>
export HUAWEI_SECURITY_TOKEN=<security-token>- 外部kubeconfig访问遵循hcloud凭证优先级:显式工具参数 > 本地hcloud配置文件 > 环境变量。
- 兜底方式需要AK/SK以及目标集群的
kubectl cce,这些信息来自显式工具参数或环境变量;加密的hcloud配置文件凭证无法被插件复用。当project_id可用时,实现会显式通过project_id传递。kubectl cce --project-id <project-id> - LTS查询需要有效的华为云凭证和已授权的项目。
安全规则:
- 严禁打印、持久化或硬编码AK/SK、安全令牌、kubeconfig内容或临时客户端凭证。
- 严禁使用或
echo $HUAWEI_AK查看凭证。echo $HUAWEI_SK - 优先使用本地hcloud配置文件进行外部kubeconfig访问。
- 使用最小权限IAM身份和只读Kubernetes RBAC权限。
可选环境变量兜底方案:
bash
export HUAWEI_AK=<your-ak>
export HUAWEI_SK=<your-sk>
export HUAWEI_REGION=cn-north-4
export HUAWEI_PROJECT_ID=<project-id>
export HUAWEI_SECURITY_TOKEN=<security-token>3. IAM Permission Requirements
3. IAM权限要求
| Permission | Purpose |
|---|---|
| Inspect cluster external endpoint availability |
| Generate temporary kubeconfig for external |
| Query historical Event records in LTS |
The effective Kubernetes identity also needs read-only and permission for Events in the target namespace or cluster.
getlistPermission Failure Handling:
- Report the failed operation and required permission.
- Ask the user to grant the missing IAM or Kubernetes RBAC permission.
- Do not retry until the user confirms the permission is ready.
| 权限 | 用途 |
|---|---|
| 检查集群外部端点可用性 |
| 生成用于外部 |
| 查询LTS中的历史Event记录 |
生效的Kubernetes身份还需要对目标命名空间或集群的Events拥有只读和权限。
getlist权限失败处理:
- 报告失败的操作和所需权限。
- 请用户授予缺失的IAM或Kubernetes RBAC权限。
- 在用户确认权限已配置前不要重试。
Core Commands
核心命令
All commands use the bundled dispatcher:
bash
python3 scripts/huawei-cloud.py <tool-name> key=value key=value所有命令均使用随附的调度器:
bash
python3 scripts/huawei-cloud.py <tool-name> key=value key=valueKooCLI Command Format Standard
KooCLI命令格式规范
Users invoke the dispatcher rather than raw commands. For current Event queries, the dispatcher internally uses hcloud only to inspect the CCE cluster and generate a temporary external kubeconfig when appropriate.
hcloudbash
python3 scripts/huawei-cloud.py huawei_get_cce_events \
region=cn-north-4 cluster_id=<cluster-id>Follow these rules:
- Use parameters and quote values containing spaces or special shell characters.
key=value - Do not print or persist credentials, security tokens, or temporary kubeconfig files.
- Use exact values for cluster-scoped queries.
cluster_id - Keep LTS queries time-bounded with both and
start_time.end_time
用户调用调度器而非直接使用原生命令。对于当前事件查询,调度器内部仅在需要时使用hcloud检查CCE集群并生成临时外部kubeconfig。
hcloudbash
python3 scripts/huawei-cloud.py huawei_get_cce_events \
region=cn-north-4 cluster_id=<cluster-id>遵循以下规则:
- 使用格式的参数,包含空格或特殊Shell字符的参数值需加引号。
key=value - 不要打印或持久化凭证、安全令牌或临时kubeconfig文件。
- 集群范围的查询使用精确的值。
cluster_id - LTS查询需同时指定和
start_time以限定时间范围。end_time
1. Current Kubernetes Events
1. 当前Kubernetes Events
bash
undefinedbash
undefinedQuery Warning Events (default)
查询Warning Events(默认)
python3 scripts/huawei-cloud.py huawei_get_cce_events
region=cn-north-4 cluster_id=<cluster-id>
region=cn-north-4 cluster_id=<cluster-id>
python3 scripts/huawei-cloud.py huawei_get_cce_events
region=cn-north-4 cluster_id=<cluster-id>
region=cn-north-4 cluster_id=<cluster-id>
Query Events in a namespace
查询指定命名空间内的Events
python3 scripts/huawei-cloud.py huawei_get_cce_events
region=cn-north-4 cluster_id=<cluster-id> namespace=default
region=cn-north-4 cluster_id=<cluster-id> namespace=default
python3 scripts/huawei-cloud.py huawei_get_cce_events
region=cn-north-4 cluster_id=<cluster-id> namespace=default
region=cn-north-4 cluster_id=<cluster-id> namespace=default
Limit returned Event records
限制返回的Event记录数
python3 scripts/huawei-cloud.py huawei_get_cce_events
region=cn-north-4 cluster_id=<cluster-id> limit=100
region=cn-north-4 cluster_id=<cluster-id> limit=100
python3 scripts/huawei-cloud.py huawei_get_cce_events
region=cn-north-4 cluster_id=<cluster-id> limit=100
region=cn-north-4 cluster_id=<cluster-id> limit=100
Query all Event types only when explicitly needed
仅在明确需要时查询所有Event类型
python3 scripts/huawei-cloud.py huawei_get_cce_events
region=cn-north-4 cluster_id=<cluster-id> event_type=all limit=100
region=cn-north-4 cluster_id=<cluster-id> event_type=all limit=100
The tool returns only Warning Events by default, using the Kubernetes API server-side field selector. It first uses the external endpoint with a temporary kubeconfig; it then falls back to `kubectl cce`. For large clusters, full Event history can be substantial; query all types only after the user explicitly requests it with `event_type=all`.python3 scripts/huawei-cloud.py huawei_get_cce_events
region=cn-north-4 cluster_id=<cluster-id> event_type=all limit=100
region=cn-north-4 cluster_id=<cluster-id> event_type=all limit=100
该工具默认仅返回Warning Events,使用Kubernetes API服务端字段选择器实现。它优先通过临时kubeconfig使用外部端点访问,失败则兜底使用`kubectl cce`。对于大型集群,完整事件历史数据量可能很大;仅在用户通过`event_type=all`显式请求时才查询所有类型。2. Historical Events From LTS
2. 来自LTS的历史事件
bash
undefinedbash
undefinedQuery an explicit historical window
查询指定历史时间窗口
python3 scripts/huawei-cloud.py huawei_query_k8s_events_from_lts
region=cn-north-4 cluster_id=<cluster-id>
start_time="2026-05-30 06:00:00"
end_time="2026-05-30 08:00:00"
region=cn-north-4 cluster_id=<cluster-id>
start_time="2026-05-30 06:00:00"
end_time="2026-05-30 08:00:00"
python3 scripts/huawei-cloud.py huawei_query_k8s_events_from_lts
region=cn-north-4 cluster_id=<cluster-id>
start_time="2026-05-30 06:00:00"
end_time="2026-05-30 08:00:00"
region=cn-north-4 cluster_id=<cluster-id>
start_time="2026-05-30 06:00:00"
end_time="2026-05-30 08:00:00"
Query with an LTS keyword filter
带LTS关键字过滤的查询
python3 scripts/huawei-cloud.py huawei_query_k8s_events_from_lts
region=cn-north-4 cluster_id=<cluster-id>
start_time="2026-05-30 00:00:00"
end_time="2026-05-30 23:59:59"
keywords=FailedScheduling
region=cn-north-4 cluster_id=<cluster-id>
start_time="2026-05-30 00:00:00"
end_time="2026-05-30 23:59:59"
keywords=FailedScheduling
LTS time format is UTC `YYYY-MM-DD HH:MM:SS`; the tool always interprets input values as UTC, not the local time zone of the host. The cluster must have the Cloud Native Log Collection add-on (`log-agent`) installed and healthy with the `default-event` Event-to-LTS `LogConfig`. The tool uses `kubectl cce --cluster-id <cluster-id> --region <region> get logconfigs.logging.openvessel.io -A -o json`, selects `default-event`, and reads `outputDetail.LTS.ltsGroupID` and `ltsStreamID`. LTS queries default to `event_type=Warning`, using `Warning` as a server-side keyword filter. For large clusters, request full Event history only after user confirmation with `event_type=all`; this removes the type keyword filter. LTS filtering is keyword matching, not a structured-field selector.python3 scripts/huawei-cloud.py huawei_query_k8s_events_from_lts
region=cn-north-4 cluster_id=<cluster-id>
start_time="2026-05-30 00:00:00"
end_time="2026-05-30 23:59:59"
keywords=FailedScheduling
region=cn-north-4 cluster_id=<cluster-id>
start_time="2026-05-30 00:00:00"
end_time="2026-05-30 23:59:59"
keywords=FailedScheduling
LTS时间格式为UTC时区的`YYYY-MM-DD HH:MM:SS`;工具始终将输入值视为UTC时间,而非主机的本地时区。集群必须安装云原生日志采集插件(`log-agent`)且运行正常,并配置了`default-event`类型的Event-to-LTS `LogConfig`。工具会使用`kubectl cce --cluster-id <cluster-id> --region <region> get logconfigs.logging.openvessel.io -A -o json`,选择`default-event`配置,并读取`outputDetail.LTS.ltsGroupID`和`ltsStreamID`。LTS查询默认为`event_type=Warning`,使用`Warning`作为服务端关键字过滤器。对于大型集群,仅在用户通过`event_type=all`确认后才请求完整事件历史;这会移除类型关键字过滤。LTS过滤是关键字匹配,而非结构化字段选择器。3. Query and Analyze Event Results
3. 查询并分析事件结果
Without , the tool queries and analyzes current cluster Events by default. For historical requests spanning more than one hour, use LTS with a bounded time window. Providing or automatically selects LTS; may also be set explicitly. Passing an array (or a complete response object containing it) retains offline analysis behavior.
eventsstart_timeend_timeevent_source=ltseventsbash
undefined未提供参数时,工具默认查询并分析当前集群Events。对于超过一小时的历史查询请求,请使用带时间窗口限制的LTS。提供或会自动选择LTS;也可以显式设置。传入数组(或包含该数组的完整响应对象)将启用离线分析模式。
eventsstart_timeend_timeevent_source=ltseventsbash
undefinedQuery and analyze current Events
查询并分析当前Events
python3 scripts/huawei-cloud.py huawei_analyze_cce_events
region=cn-north-4 cluster_id=<cluster-id>
region=cn-north-4 cluster_id=<cluster-id>
python3 scripts/huawei-cloud.py huawei_analyze_cce_events
region=cn-north-4 cluster_id=<cluster-id>
region=cn-north-4 cluster_id=<cluster-id>
Query and analyze historical LTS Events
查询并分析LTS历史Events
python3 scripts/huawei-cloud.py huawei_analyze_cce_events
region=cn-north-4 cluster_id=<cluster-id> event_source=lts
start_time="2026-05-30 06:00:00" end_time="2026-05-30 08:00:00"
region=cn-north-4 cluster_id=<cluster-id> event_source=lts
start_time="2026-05-30 06:00:00" end_time="2026-05-30 08:00:00"
python3 scripts/huawei-cloud.py huawei_analyze_cce_events
region=cn-north-4 cluster_id=<cluster-id> event_source=lts
start_time="2026-05-30 06:00:00" end_time="2026-05-30 08:00:00"
region=cn-north-4 cluster_id=<cluster-id> event_source=lts
start_time="2026-05-30 06:00:00" end_time="2026-05-30 08:00:00"
Analyze supplied Events without a cloud query
无需云查询,分析提供的Events
python3 scripts/huawei-cloud.py huawei_analyze_cce_events
events='[{"type":"Warning","reason":"FailedScheduling","namespace":"default","count":3}]'
max_groups=10
events='[{"type":"Warning","reason":"FailedScheduling","namespace":"default","count":3}]'
max_groups=10
undefinedpython3 scripts/huawei-cloud.py huawei_analyze_cce_events
events='[{"type":"Warning","reason":"FailedScheduling","namespace":"default","count":3}]'
max_groups=10
events='[{"type":"Warning","reason":"FailedScheduling","namespace":"default","count":3}]'
max_groups=10
undefinedRisk Levels
风险等级
This skill is read-only. It never changes cloud resources, Kubernetes resources, LTS configuration, or local cluster access configuration.
| Level | Meaning | Execution Guidance |
|---|---|---|
| R3 | Read-only Event query or local Event analysis | May run automatically |
| Tool | Operation Type | Risk Level | Description |
|---|---|---|---|
| Query | R3 | Query current cluster or namespace Events through |
| Query | R3 | Query historical Event records from configured LTS collection |
| Query and analyze | R3 | Query current or LTS Events when needed, then aggregate by type, reason, namespace, and resource |
本技能为只读模式。它永远不会修改云资源、Kubernetes资源、LTS配置或本地集群访问配置。
| 等级 | 含义 | 执行指引 |
|---|---|---|
| R3 | 只读Event查询或本地Event分析 | 可自动运行 |
| 工具 | 操作类型 | 风险等级 | 描述 |
|---|---|---|---|
| 查询 | R3 | 通过 |
| 查询 | R3 | 从配置的LTS采集项中查询历史Event记录 |
| 查询与分析 | R3 | 必要时查询当前或LTS Events,然后按类型、原因、命名空间和资源聚合 |
Parameter Reference
参数参考
Common Parameters
通用参数
| Parameter | Required/Optional | Description | Default |
|---|---|---|---|
| Required | Huawei Cloud region | |
| Required | Exact CCE cluster ID | N/A |
| Optional | Explicit AK for access paths that support it | profile/environment fallback |
| Optional | Explicit SK for access paths that support it | profile/environment fallback |
| Required for | Target cluster's Huawei Cloud project ID | hcloud profile/IAM/environment fallback for external kubeconfig access |
| 参数 | 必填/可选 | 描述 | 默认值 |
|---|---|---|---|
| 必填 | 华为云区域 | |
| 必填 | 精确的CCE集群ID | 无 |
| 可选 | 用于支持显式凭证的访问路径的AK | 配置文件/环境变量兜底 |
| 可选 | 用于支持显式凭证的访问路径的SK | 配置文件/环境变量兜底 |
| | 目标集群的华为云项目ID | 外部kubeconfig访问使用hcloud配置文件/IAM/环境变量兜底 |
Current Event Query Parameters
当前事件查询参数
| Tool | Required | Optional |
|---|---|---|
| | |
| 工具 | 必填参数 | 可选参数 |
|---|---|---|
| | |
Historical Event Query Parameters
历史事件查询参数
| Tool | Required | Optional |
|---|---|---|
| | |
| 工具 | 必填参数 | 可选参数 |
|---|---|---|
| | |
Event Analysis Parameters
事件分析参数
| Tool | Required | Optional |
|---|---|---|
| Either | |
| 工具 | 必填参数 | 可选参数 |
|---|---|---|
| | |
Output Format
输出格式
All public response fields, Event record fields, and resource-status states are defined in output-schema.md. That reference is the single source of truth for output contracts.
所有公共响应字段、Event记录字段和资源状态均在output-schema.md中定义。该参考文档是输出契约的唯一可信来源。
Workflow
工作流程
- Identify , exact
region, optional namespace, and incident time window.cluster_id - Use for current Event inspection.
huawei_get_cce_events - Use for historical Event windows longer than one hour, or when a precise LTS time range or keyword filtering is required.
huawei_query_k8s_events_from_lts - Pass the returned to
eventsto aggregate reasons, namespaces, resources, and repeated patterns.huawei_analyze_cce_events - Hand off evidence to the relevant Pod, Workload, Node, Storage, or Network diagnosis skill.
See workflow.md for pattern recognition and time-window analysis guidance.
- 确定、精确的
region、可选的命名空间和故障时间窗口。cluster_id - 使用进行当前Event检查。
huawei_get_cce_events - 对于超过一小时的历史事件窗口,或需要精确LTS时间范围或关键字过滤时,使用。
huawei_query_k8s_events_from_lts - 将返回的传递给
events,以聚合原因、命名空间、资源和重复模式。huawei_analyze_cce_events - 将证据移交给相关的Pod、工作负载、节点、存储或网络诊断技能。
有关模式识别和时间窗口分析的指导,请参见workflow.md。
Verification
验证方式
Run a current Event query first:
bash
python3 scripts/huawei-cloud.py huawei_get_cce_events \
region=cn-north-4 cluster_id=<cluster-id> limit=10When default Event-to-LTS collection is enabled, verify a bounded historical query:
bash
python3 scripts/huawei-cloud.py huawei_query_k8s_events_from_lts \
region=cn-north-4 cluster_id=<cluster-id> \
start_time="2026-05-30 06:00:00" \
end_time="2026-05-30 07:00:00"Verify that the current Event response includes , and that the LTS response identifies the default LTS group and stream. Do not create or change logging configuration as part of verification.
access_method首先运行当前Event查询:
bash
python3 scripts/huawei-cloud.py huawei_get_cce_events \
region=cn-north-4 cluster_id=<cluster-id> limit=10当启用了默认Event-to-LTS采集时,验证带限制的历史查询:
bash
python3 scripts/huawei-cloud.py huawei_query_k8s_events_from_lts \
region=cn-north-4 cluster_id=<cluster-id> \
start_time="2026-05-30 06:00:00" \
end_time="2026-05-30 07:00:00"验证当前Event响应包含,且LTS响应标识出默认LTS日志组和日志流。验证过程中不要创建或修改日志配置。
access_methodBest Practices
最佳实践
- Start with warnings - filter before detailed inspection.
type == "Warning" - Group by reason - repeated reasons reveal systemic issues faster than individual records.
- Use exact cluster IDs - do not infer a cluster from its name.
- Keep LTS windows bounded - use the smallest incident window that answers the question.
- Use LTS for history - current Kubernetes Events have limited retention.
- Hand off rather than remediate - this skill provides evidence only.
- 从警告开始排查 - 在详细检查前先过滤的事件。
type == "Warning" - 按原因分组 - 重复出现的原因比单个记录能更快揭示系统性问题。
- 使用精确的集群ID - 不要从集群名称推断集群。
- 限定LTS时间窗口 - 使用能满足查询需求的最小故障时间窗口。
- 历史查询用LTS - 当前Kubernetes Events的保留期有限。
- 仅交接不修复 - 本技能仅提供证据。
Notes
注意事项
- No active warning does not prove a cluster is healthy; inspect historical LTS Events for recent or recovered incidents when available.
- The Event-to-LTS path depends on a healthy log-agent add-on with default Event collection enabled.
- Event summaries should redact sensitive production workload, Pod, and node identifiers where the audience does not need them.
- Do not modify Kubernetes, CCE logging, LTS, or cloud resources through this skill.
- 没有活动警告并不代表集群健康;如有可能,请检查历史LTS Events以了解近期或已恢复的故障。
- Event-to-LTS链路依赖于健康的log-agent插件,且已启用默认Event采集。
- 当受众不需要时,事件摘要应对敏感的生产工作负载、Pod和节点标识符进行脱敏。
- 禁止通过本技能修改Kubernetes、CCE日志、LTS或云资源。
Troubleshooting
故障排查
| Symptom | Likely Cause | Action |
|---|---|---|
| External kubeconfig access fails | No external endpoint, invalid profile, or missing CCE permission | Verify |
| Plugin missing or plugin credentials unavailable | Install/configure the plugin using kubectl-cce.md |
| LTS query finds no default Event stream | Default Event collection is not enabled or has not finished provisioning | Enable default Event collection through the log-agent add-on, then retry |
| LTS query returns no records | Time window, keywords, retention, or event collection does not match | Narrow or correct the window and verify the default LTS group and stream |
| Too many current Events | Broad cluster query | Warning is the default; provide |
| Permission denied | Missing IAM or Kubernetes RBAC permission | Grant the reported least-privilege permission, then retry |
| 症状 | 可能原因 | 解决方案 |
|---|---|---|
| 外部kubeconfig访问失败 | 无外部端点、配置文件无效或缺少CCE权限 | 验证 |
| 插件缺失或插件凭证不可用 | 使用kubectl-cce.md安装/配置插件 |
| LTS查询未找到默认Event流 | 未启用默认Event采集或尚未完成配置 | 通过log-agent插件启用默认Event采集,然后重试 |
| LTS查询无返回记录 | 时间窗口、关键字、保留期或事件采集不匹配 | 缩小或修正时间窗口,验证默认LTS日志组和日志流 |
| 当前Events数量过多 | 集群范围查询过宽 | 默认仅返回Warning;提供 |
| 权限被拒绝 | 缺少IAM或Kubernetes RBAC权限 | 授予报告的最小权限,然后重试 |
Limitations
限制说明
- The skill provides only the two documented read-only Event tools.
- Current Event queries support only namespace and Event type (,
Warning, orNormal) server-side selection.all - Historical queries require default Event-to-LTS collection enabled before the incident; the skill cannot recover uncollected history.
- The skill cannot create, modify, or delete LTS streams, Kubernetes resources, or CCE resources.
- The skill does not automatically select a cluster, namespace, event filter, or diagnosis/remediation action for the user.
- 本技能仅提供两个已文档化的只读Event工具。
- 当前Event查询仅支持命名空间和Event类型(、
Warning或Normal)的服务端筛选。all - 历史查询要求故障发生前已启用默认Event-to-LTS采集;本技能无法恢复未采集的历史数据。
- 本技能不能创建、修改或删除LTS日志流、Kubernetes资源或CCE资源。
- 本技能不会自动为用户选择集群、命名空间、事件过滤器或诊断/修复操作。
References
参考文档
| Document | Use |
|---|---|
| Workflow | Event query sequence, grouping, patterns, and time-window analysis |
| Risk Rules | Read-only boundaries, redaction, and handoff constraints |
| Output Schema | Query, analysis, and Event record fields |
| kubectl-cce | kubectl-cce installation, credentials, and access fallback |
| Acceptance Criteria | Expected outcomes for current, historical, and combined query-and-analysis flows |
| 文档 | 用途 |
|---|---|
| 工作流程 | Event查询顺序、分组、模式和时间窗口分析 |
| 风险规则 | 只读边界、脱敏和交接约束 |
| 输出 schema | 查询、分析和Event记录字段 |
| kubectl-cce | kubectl-cce安装、凭证和访问兜底 |
| 验收标准 | 当前、历史和组合查询分析流程的预期结果 |