Manage Huawei Cloud CCE cluster lifecycle, node pools, nodes, and addons with built-in safety confirmations.
Documents
huawei-cloud-cce-query
Try itQuery Huawei Cloud CCE (Cloud Container Engine) clusters and report their names, IDs, statuses, versions, and node information across a project. Use when listing CCE clusters, looking up a cluster name, showing cluster detail, or inspecting cluster status and nodes. Provides read-only inspection for daily operations, inventory reporting, and troubleshooting. Triggers include: CCE query, list CCE clusters, query CCE cluster names, CCE cluster inventory, show CCE cluster, list CCE nodes, check cluster status, CCE集群查询, 查询CCE集群, CCE集群名称, CCE集群列表, 查看CCE集群.
What it does
Query Huawei Cloud CCE (Cloud Container Engine) clusters and report their names, IDs, statuses, versions, and node information across a project. Use when listing CCE clusters, looking up a cluster name, showing cluster detail, or inspecting cluster status and nodes. Provides read-only inspection for daily operations, inventory reporting, and troubleshooting. Triggers include: CCE query, list CCE clusters, query CCE cluster names, CCE cluster inventory, show CCE cluster, list CCE nodes, check cluster status, CCE集群查询, 查询CCE集群, CCE集群名称, CCE集群列表, 查看CCE集群.
The skill document
Huawei Cloud CCE Query Skill
Overview
This skill provides read-only query capabilities for Huawei Cloud CCE (Cloud Container Engine, the managed Kubernetes service). It lists all clusters in a project with their names, IDs, status, version and flavor, shows a single cluster's detail, and lists nodes for a given cluster. It is designed for inventory reporting, daily inspection, and quick name lookups.
Architecture:
Agent → hcloud CLI (primary) → Huawei Cloud CCE API
↘ Python SDK (fallback) ↗
Applicable Scenarios:
- Inventory all CCE clusters and collect their names in a region
- Check cluster health/status (Available, Creating, Upgrading, Deleting, etc.)
- Retrieve a specific cluster's detail by ID or name
- List the nodes inside a cluster for capacity/usage review
Prerequisites
- hcloud CLI installed and authenticated — See
references/cli-installation-guide.md - Python 3.8+ with
huaweicloudsdkccepackage (SDK fallback) - Huawei Cloud AK/SK configured via environment variables or
hcloud configure set - IAM permissions —
CCE ReadOnlyAccessor finer-grained policy — Seereferences/iam-policies.md
Workflow
- Identify query scope — Decide whether to list all clusters, show one cluster detail, or list nodes of a cluster
- Select execution mode — Use the hcloud CLI by default; fall back to the Python SDK if the CLI is unavailable
- Execute the query — Run the appropriate command and capture the response
- Present results — Summarize cluster names, IDs, statuses and node counts in a readable form
Core Commands
Cluster Queries
| Purpose | Command |
|---|---|
| List all CCE clusters (names, IDs, status) | hcloud CCE ListClusters --cli-region={region} |
| List clusters with a status filter | hcloud CCE ListClusters --cli-region={region} --status={status} |
| List clusters of a given type | hcloud CCE ListClusters --cli-region={region} --type={type} |
| List clusters with node/addon detail | hcloud CCE ListClusters --cli-region={region} --detail=true |
| Show a single cluster's detail | hcloud CCE ShowCluster --cli-region={region} --cluster_id={cluster_id} |
Node Queries
| Purpose | Command |
|---|---|
| List nodes in a cluster | hcloud CCE ListNodes --cli-region={region} --cluster_id={cluster_id} |
| Show a single node's detail | hcloud CCE ShowNode --cli-region={region} --cluster_id={cluster_id} --node_id={node_id} |
Name-Only Lookup (jq)
To extract just the cluster names:
hcloud CCE ListClusters --cli-region={region} | jq -r '.items[].metadata.name'
SDK Fallback Examples
When the CLI is unavailable, use the Python SDK:
import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkcce.v3.region.cce_region import CceRegion
from huaweicloudsdkcce.v3 import CceClient, ListClustersRequest
credentials = BasicCredentials() \
.with_ak(os.getenv("HUAWEI_ACCESS_KEY")) \
.with_sk(os.getenv("HUAWEI_SECRET_KEY")) \
.with_project_id("{project_id}")
client = CceClient.new_builder() \
.with_credentials(credentials) \
.with_region(CceRegion.value_of("{region}")) \
.build()
request = ListClustersRequest()
response = client.list_clusters(request)
for cluster in response.items:
print(cluster.metadata.name, cluster.status.phase)
Parameter Confirmation
| Parameter | Required | Description | Example |
|---|---|---|---|
{region} | Yes | Huawei Cloud region | cn-north-4 |
{cluster_id} | Conditional | CCE cluster ID (required for ShowCluster/ListNodes) | 0ef72478-4e7e-11f1-a40f-0255ac100246 |
{node_id} | Conditional | CCE node ID (required for ShowNode) | d4f16c73-... |
{status} | No | Cluster status filter | Available |
{type} | No | Cluster type filter | VirtualMachine |
{project_id} | Conditional | Project ID (required for SDK/API) | 0a1234b56c78d9ef |
Reference Documents
- CLI Installation Guide
- IAM Policies
- Verification Method
- Data Flow Diagram
- Acceptance Criteria
KooCLI Command Format Standard
hcloud CCE --cli-region= [--key=value ...]
| Feature | Description | Example |
|---|---|---|
| Service name | CCE | hcloud CCE ListClusters |
| Operation name | PascalCase | ListClusters, ShowCluster, ListNodes |
| Region parameter | --cli-region= | --cli-region=cn-north-4 |
| Simple parameter | --key=value | --cluster_id=xxx |
Related skills
Use when performing periodic, low-risk health checks on Huawei Cloud CCE clusters — daily inspection, quick health check, heartbeat summary, or continuous op...
Queries Huawei Cloud monitoring and enterprise project resources (CES/EPS). Covers alarm rules, alarm histories, alarm templates, dashboards, notification ma...
查询华为云 CES(云监控服务)监控指标列表与指标数据。支持指标列表查询(ListMetrics) 按命名空间/指标名/维度/排序过滤,以及指标数据查询(ShowMetricData)按时间范围、 聚合粒度、聚合方式获取监控数据点。只读操作,JSON 输出全部字段,AK/SK 环境变量认证。
Query the list of Huawei Cloud CSS (Cloud Search Service) Elasticsearch (ES) clusters under the current project/region. Lists all ES clusters with their ID, name, status, endpoint, datastore engine/version, instance configuration, VPC/subnet/security-group, tags and enterprise project. Supports optional filtering by datastore engine type and pagination (limit/offset) for account-wide cluster inventory. Use when the user wants to: (1) list all Huawei Cloud ES clusters / 查询华为云ES列表, (2) check how many Elasticsearch clusters exist in the account or region, (3) inspect ES cluster status, endpoint, version, or node configuration for daily inspection or troubleshooting, (4) filter ES clusters by engine type (elasticsearch/logstash/opensearch) or page through results. Triggers include: "ES列表", "华为云ES列表", "查询ES列表", "ES集群列表", "elasticsearch列表", "list ES clusters", "ES cluster list", "云搜索服务列表", "CSS列表", "css list", "ListClusters", "ES集群查询", "查看ES集群"
Generate a scored cloud-native readiness report for a Huawei Cloud CCE environment with prioritized remediation items.