huawei-cloud-cce-kubernetes-event-analyzer
Query and analyze Kubernetes Events in Huawei Cloud CCE clusters. Trigger when users ask about CCE events, Kubernetes warning events, FailedScheduling…
от huaweicloudskill531 установка в других каталогах
Установить huawei-cloud-cce-kubernetes-event-analyzer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
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:
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
| 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:
python3 scripts/huawei-cloud.py <tool-name> key=value key=value
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.
python3 scripts/huawei-cloud.py huawei_get_cce_events \
region=cn-north-4 cluster_id=<cluster-id>
Follow these rules:
- Use
key=valueparameters and quote values containing spaces or specia
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл huawei-cloud-cce-kubernetes-event-analyzer?
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.
Как установить скилл huawei-cloud-cce-kubernetes-event-analyzer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл huawei-cloud-cce-kubernetes-event-analyzer запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…