huaweicloud/huaweicloud-skills/huawei-cloud-cci-instance-management
Claude Code and agent skill by huaweicloud/huaweicloud-skills
- community
Checking that the SKILL.md file is still in the repository.
Huawei Cloud CCI (Cloud Container Instance) full lifecycle management using hcloud CLI. Covers Namespace, Network, Deployment, StatefulSet, Pod creation/update/delete/status, EIPPool for public IP, logs and metrics. Two-step confirmation for all destructive operations (delete namespace cascades all resources under it). Use this skill when the user wants to operate CCI serverless containers via command line. Triggers: CCI, 云容器实例, serverless container, 容器实例, namespace, deployment, statefulset, pod, EIPPool, CCI负载, 无服务器容器, 创建容器实例, 删除容器实例, 容器状态, 容器日志
Install
npx vskill@latest install huaweicloud/huaweicloud-skills/huawei-cloud-cci-instance-managementSKILL.md
The same SKILL.md was published earlier as huaweicloud/huaweicloud-skills/huawei-cloud-cci-instance-management.
Huawei Cloud CCI Container Instance Lifecycle Management
Overview
Manage Huawei Cloud CCI (Cloud Container Instance) full lifecycle using hcloud CLI (KooCLI). CCI is a serverless container service — no cluster management needed, just create a Namespace, define a Network, then deploy workloads directly.
Architecture: hcloud CLI → CCI OpenAPI → Namespace / Network / Deployment / StatefulSet / Pod / EIPPool (plus a helper script for annotation keys that hcloud CLI cannot express)
Constraints and Rules
Security Rules
- Two-step confirmation: All destructive operations (delete Namespace/Network/Deployment/StatefulSet/Pod/EIPPool/PVC) and all billable creation operations require explicit user confirmation — preview command, resource details, and cost/risk warning first; execute only after user confirms. Creating an EIPPool auto-creates EIPs and bandwidth and therefore incurs recurring charges: state the cost implication before asking for confirmation, and never create it silently.
- Credential security: Never expose AK/SK values in conversation, commands, or output. Only use
hcloud configure listto check credential status (presence only). Prefer profile mode or environment variables over explicit AK/SK parameters.
Supported Scope
This skill manages only these CCI resources and their lifecycle: Namespace, Network, Deployment, StatefulSet, Pod, EIPPool, plus read-only status/log/event/quota queries for them.
Explicitly out of scope — decline these requests, say why, and point the user at the matching skill or the Huawei Cloud console. Do not attempt them and do not invoke another skill on the user's behalf:
| Out-of-scope request | Where it belongs | |
|---|---|---|
| CCE clusters, nodes, node pools | huawei-cloud-cce-* skills / CCE console | |
| ECS / BMS instances, disks | huawei-cloud-ecs-* skills / ECS console | |
| RDS, DDS, DCS databases | corresponding database skill / console | |
| ELB, SFS, OBS, DNS, CDN resources | networking/storage skills / console | |
| Creating VPC, subnet or security group themselves | huawei-cloud-vpc-* skills / VPC console | |
| Billing, invoices, cost breakdown | Billing Center in the console | |
kubectl workflows | huawei-cloud-kubectl-cce-installer |
This skill does not manage the lifecycle of other Kubernetes objects that CCI may also expose — Service, Ingress, ConfigMap, Secret, PVC, Job, Volcano Job, RoleBinding — and kubectl is out of scope. CCI does offer some write operations for those objects, but using them is not part of this skill, with one documented exception: the confirmation-gated cleanup of PVCs left behind after deleting a StatefulSet (see references/task-statefulset-management.md). Read-only inspection of ConfigMap, Secret, Service, ResourceQuota, Event, Pod status and logs is in scope and is exactly what the diagnosis playbooks use — see references/diagnosis-playbooks.md.
Resource Constraints
- Namespace flavor annotation is mandatory: Every namespace must carry the flavor annotation (value:
general-computingorgpu-accelerated). Omitting it fails creation, and the hyphenated key form only takes effect forgeneral-computing— see hcloud CLI Constraints. - limits must equal requests: CCI enforces
resources.limits == resources.requests. Mismatch causes "limit and request doesn't equal" error. Set both to the same values (e.g.,500m/1Gi). - Network must precede workloads: Pod/Deployment/StatefulSet creation fails or stays Pending if no Network exists in the namespace. Always create Network before deploying workloads.
- VPC CIDR restriction: VPC subnet CIDR must NOT be
10.247.0.0/16— CCI reserves this range for Service networking. Using it causes IP conflicts and workload creation failures. - Deletion order: Pod → Deployment/StatefulSet → EIPPool → Network → Namespace. Deleting a Namespace cascades all resources under it.
hcloud CLI Constraints
- Network creation must use Python helper script: hcloud CLI cannot pass annotation keys containing dots (
network.alpha.kubernetes.io/default-security-group). Neither dot notation nor--cli-jsonInputworks. Usescripts/cci_network_helper.py. - Namespace flavor annotation — the hyphen workaround is NOT safe for every flavor: The hyphen form (
--metadata.annotations.namespace-kubernetes-io/flavor=<value>) is normalized by CCI back tonamespace.kubernetes.io/flavoronly for `general-computing`. Forgpu-acceleratedthe hyphen form is silently dropped and the namespace ends up asgeneral-computing, so the GPU capability is never enabled. The dotted keynamespace.kubernetes.io/flavoris the required form, but hcloud CLI cannot pass dotted annotation keys (verified: the dotted,{...}-escaped and JSON-object forms are all rejected withUSE_ERROR). Create GPU namespaces with the helper script's direct API call instead:
python scripts/cci_network_helper.py create-namespace --name=<ns> --flavor=gpu-accelerated --region=<region> then confirm the canonical value with hcloud CCI readCoreV1Namespace --name=<ns>. Hyphen replacement never works for Network.
- Always verify parameters with `--help`: CCI has hundreds of parameters. Run
hcloud CCI <Operation> --helpbefore constructing any command. The help output is the authoritative source.
Detailed breakdowns of these rules are in Security Constraints, hcloud CLI Limitations, and Precautions.
Standard Workflow
Prerequisites
1. hcloud CLI Requirements (MANDATORY)
- hcloud CLI installed (version >= 7.2.2)
- Run
hcloud versionto verify installation - First-time usage:
printf "y\n" | hcloud versionto accept privacy statement hcloudmust be resolvable onPATH. If it is not (or you want to pin a specific build), setHCLOUD_PATHto the executable —scripts/cci_network_helper.pyhonours it. You can also bypass project-ID auto-detection entirely by passing--project-idto the helper.
2. Credential Configuration
hcloud CLI supports two credential modes. See references/credential-configuration.md for full details.
Quick setup (choose one):
- Security rules: Never expose AK/SK/SecurityToken values. Use
hcloud configure listto check presence only.
⚠️ Known limitation — Python helper script credentials are independent of hcloud CLI: The Python helper script (scripts/cci_network_helper.py) usesHW_ACCESS_KEY/HW_SECRET_KEY(and optionallyHW_SECURITY_TOKEN) environment variables for authentication, which are separate from hcloud CLI's credential source (profile orHUAWEI_CLOUD_AK/HUAWEI_CLOUD_SK). If the credentials inHW_ACCESS_KEY/HW_SECRET_KEYlack the necessary IAM permissions for CCI Network creation, the script will fail with a 403 error. Ensure these variables contain credentials with sufficient CCI permissions (e.g.,CCI FullAccess). The hcloud CLI continues using its own credential source independently — running the helper script does not affect subsequent hcloud CLI commands.
3. Validation Check
Security Constraints
Dangerous Operation Confirmation Mechanism
This skill strictly enforces a two-step confirmation mechanism for all destructive and billable creation operations.
All destructive operations and all billable creation operations require explicit user confirmation before execution. The process:
Step 1: Preview — Show the command, resource details, risk warning, and any cost implication
Step 2: Confirm & Execute — Only after user explicitly confirms
Operations Requiring Confirmation
| Operation | Risk Level | Description | |
|---|---|---|---|
| Create EIPPool | 💰 Billable | Auto-creates EIPs and bandwidth — recurring charges. Give the cost warning and get explicit confirmation before creating | |
| Delete Namespace | 🔴 Critical | Cascades — deletes ALL resources under this namespace (Network, Pods, Deployments, etc.) | |
| Delete Network | 🟠 High | Disconnects namespace from VPC; running pods lose network | |
| Delete Deployment | 🟠 High | Terminates all replicas of the workload | |
| Delete StatefulSet | 🟠 High | Terminates all replicas; PVC data may be lost | |
| Delete Pod | 🟠 High | Terminates the container instance | |
| Delete EIPPool | 🟡 Medium | Releases public IPs allocated to pods | |
| Delete PVC (StatefulSet cleanup) | 🟠 High | Destroys the claim and its volume; the data cannot be recovered. Preview with listCoreV1NamespacedPersistentVolumeClaim / readCoreV1NamespacedPersistentVolumeClaim, then delete one PVC at a time |
Credential Security
- Never expose AK/SK/SecurityToken values in conversation, commands, or output
- Never ask user to input AK/SK/SecurityToken directly in conversation
- Only use
hcloud configure listto check credential status (presence only, not values) - Prefer profile mode or environment variables over explicit AK/SK parameters
Command Format Standard
CCI follows the standard hcloud format with Kubernetes-style nested parameters:
CCI-Specific Parameter Rules
CCI parameters follow Kubernetes API conventions — deeply nested objects with dot notation:
- Annotations use `{*}` format:
--metadata.annotations.namespace-kubernetes-io/flavor=general-computing - Labels use `{*}` format:
--metadata.labels.app=my-app - Containers array (1-based):
--spec.template.spec.containers.1.name=main --spec.template.spec.containers.1.image=nginx - Resources use `{*}` format:
--spec.template.spec.containers.1.resources.limits.cpu=500m - Selector matchLabels use `{*}` format:
--spec.selector.matchLabels.app=my-app - Namespaced operations require `--namespace`: all workload operations must specify namespace
⚠️ Critical: Before constructing any CCI command, always runhcloud CCI <Operation> --helpto verify exact parameter names. CCI has hundreds of parameters; the help output is the authoritative source.
Parameter Format Details
See references/parameter-format.md for complete CCI parameter format rules and examples.
Scenario Routing
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/cci/huawei-cloud-cci-instance-management/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
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-cci-instance-management)