huaweicloud/huaweicloud-skills/huawei-cloud-cce-kubernetes-event-analyzer
Claude Code and agent skill by huaweicloud/huaweicloud-skills
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Query and analyze Kubernetes Events in Huawei Cloud CCE clusters. Trigger when users ask about CCE events, Kubernetes warning events, FailedScheduling, FailedMount, ImagePullBackOff, event patterns, historical events in LTS, or event-based diagnosis for a CCE cluster or namespace.
Install
npx vskill@latest install huaweicloud/huaweicloud-skills/huawei-cloud-cce-kubernetes-event-analyzerSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as huaweicloud/huaweicloud-skills/huawei-cloud-cce-kubernetes-event-analyzer.
Huawei Cloud CCE Kubernetes Event Analyzer
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 kubectl and a historical Event view through LTS.
Architecture: python3 scripts/huawei-cloud.py dispatcher -> kubectl through external kubeconfig or kubectl cce for current Events / kubectl cce LogConfig discovery plus hcloud LTS ListLogs for historical Events -> filtering and grouping -> diagnosis handoff.
Execution 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 huawei_get_cce_events implementation invokes kubectl internally: external kubeconfig access first, then the kubectl cce plugin fallback.
Related Skills:
huawei-cloud-kubectl-cce-installer- Installkubectland thekubectl-cceplugin required for cluster accesshuawei-cloud-cce-metric-analyzer- CCE and cloud-resource metrics
Capabilities:
- Query current Kubernetes Events across a cluster or in a namespace
- Read Events through external
kubectlkubeconfig access orkubectl 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"
Prerequisites
1. Runtime Dependencies
- Python 3.8+ for the dispatcher and result processing
hcloud(KooCLI) for cluster lookup and temporary external kubeconfig generationkubectlfor current Event readskubectl-ccewhen the cluster has no usable external endpoint; see kubectl-cce.mdhcloudLTS command support and the Cloud Native Log Collection add-on (log-agent) with adefault-eventEvent-to-LTSLogConfig.huawei_query_k8s_events_from_ltsreadslogconfigs.logging.openvessel.iothroughkubectl cce, then invokeshcloud LTS ListLogsusing the configured LTS IDs.
2. Credential Configuration
- External kubeconfig access uses hcloud credential priority: explicit tool parameters > local hcloud profile > environment variables.
- The
kubectl ccefallback requires AK/SK and the target cluster'sproject_idfrom explicit tool parameters or environment variables; encrypted hcloud profile credentials cannot be reused by the plugin. Whenproject_idis available, the implementation passes it explicitly askubectl 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
echo $HUAWEI_AKorecho $HUAWEI_SKto inspect credentials. - Prefer a local hcloud profile for external kubeconfig access.
- Use least-privilege IAM identities and read-only Kubernetes RBAC permissions.
Optional Environment Fallback:
3. IAM Permission Requirements
| Permission | Purpose | |
|---|---|---|
cce:cluster:get | Inspect cluster external endpoint availability | |
cce:cluster:createCert | Generate temporary kubeconfig for external kubectl access | |
lts:logs:search | Query historical Event records in LTS |
The effective Kubernetes identity also needs read-only get and list permission for Events in the target namespace or cluster.
Permission 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.
Core Commands
All commands use the bundled dispatcher:
KooCLI Command Format Standard
Users invoke the dispatcher rather than raw hcloud commands. For current Event queries, the dispatcher internally uses hcloud only to inspect the CCE cluster and generate a temporary external kubeconfig when appropriate.
Follow these rules:
- Use
key=valueparameters and quote values containing spaces or special shell characters. - Do not print or persist credentials, security tokens, or temporary kubeconfig files.
- Use exact
cluster_idvalues for cluster-scoped queries. - Keep LTS queries time-bounded with both
start_timeandend_time.
1. Current Kubernetes Events
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.
2. Historical Events From LTS
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.
3. Query and Analyze Event Results
Without events, 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 start_time or end_time automatically selects LTS; event_source=lts may also be set explicitly. Passing an events array (or a complete response object containing it) retains offline analysis behavior.
Risk 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 | |
|---|---|---|---|---|
huawei_get_cce_events | Query | R3 | Query current cluster or namespace Events through kubectl | |
huawei_query_k8s_events_from_lts | Query | R3 | Query historical Event records from configured LTS collection | |
huawei_analyze_cce_events | Query and analyze | R3 | Query current or LTS Events when needed, then aggregate by type, reason, namespace, and resource |
Parameter Reference
Common Parameters
| Parameter | Required/Optional | Description | Default | |
|---|---|---|---|---|
region | Required | Huawei Cloud region | HUAWEI_REGION | |
cluster_id | Required | Exact CCE cluster ID | N/A | |
ak | Optional | Explicit AK for access paths that support it | profile/environment fallback | |
sk | Optional | Explicit SK for access paths that support it | profile/environment fallback | |
project_id | Required for kubectl cce; optional otherwise | Target cluster's Huawei Cloud project ID | hcloud profile/IAM/environment fallback for external kubeconfig access |
Current Event Query Parameters
| Tool | Required | Optional | |
|---|---|---|---|
huawei_get_cce_events | region, cluster_id | namespace, event_type (Warning default, Normal, or all), limit, ak, sk, project_id (required for kubectl cce), security_token |
Historical Event Query Parameters
| Tool | Required | Optional | |
|---|---|---|---|
huawei_query_k8s_events_from_lts | region, cluster_id, start_time, end_time, project_id | event_type (Warning default, Normal, or all), keywords (requires event_type=all), ak, sk |
Event Analysis Parameters
| Tool | Required | Optional | |
|---|---|---|---|
huawei_analyze_cce_events | Either events, or region + cluster_id | event_source (current default or lts), start_time/end_time (required for lts), namespace, event_type, keywords, limit, max_groups (1-100, default 10), check_resource_status (default true when region and cluster_id are present), ak, sk, project_id, security_token |
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.
Workflow
- Identify
region, exactcluster_id, optional namespace, and incident time window. - Use
huawei_get_cce_eventsfor current Event inspection. - Use
huawei_query_k8s_events_from_ltsfor historical Event windows longer than one hour, or when a precise LTS time range or keyword filtering is required. - Pass the returned
eventstohuawei_analyze_cce_eventsto aggregate reasons, namespaces, resources, and repeated patterns. - 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.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/container/cce/huawei-cloud-cce-kubernetes-event-analyzer/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cce-kubernetes-event-analyzer)