huaweicloud/huaweicloud-skills/huawei-cloud-cci-instance-management

Claude Code and agent skill by huaweicloud/huaweicloud-skills

Trust tier 3
  • community
Source check pending

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-management

SKILL.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 list to 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 requestWhere it belongs
CCE clusters, nodes, node poolshuawei-cloud-cce-* skills / CCE console
ECS / BMS instances, diskshuawei-cloud-ecs-* skills / ECS console
RDS, DDS, DCS databasescorresponding database skill / console
ELB, SFS, OBS, DNS, CDN resourcesnetworking/storage skills / console
Creating VPC, subnet or security group themselveshuawei-cloud-vpc-* skills / VPC console
Billing, invoices, cost breakdownBilling Center in the console
kubectl workflowshuawei-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-computing or gpu-accelerated). Omitting it fails creation, and the hyphenated key form only takes effect for general-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-jsonInput works. Use scripts/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 to namespace.kubernetes.io/flavor only for `general-computing`. For gpu-accelerated the hyphen form is silently dropped and the namespace ends up as general-computing, so the GPU capability is never enabled. The dotted key namespace.kubernetes.io/flavor is the required form, but hcloud CLI cannot pass dotted annotation keys (verified: the dotted, {...}-escaped and JSON-object forms are all rejected with USE_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> --help before 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

1. Create Namespace (with flavor annotation)
2. Create Network (requires Python helper script for annotation — see hcloud CLI Limitations)
3. Create Deployment / StatefulSet / Pod (run workloads)
4. Query status, view logs
5. (Optional) Create EIPPool for Pod public IP access
6. Cleanup: delete workload → delete Network → delete Namespace

Prerequisites

1. hcloud CLI Requirements (MANDATORY)
  • hcloud CLI installed (version >= 7.2.2)
  • Run hcloud version to verify installation
  • First-time usage: printf "y\n" | hcloud version to accept privacy statement
  • hcloud must be resolvable on PATH. If it is not (or you want to pin a specific build), set HCLOUD_PATH to the executable — scripts/cci_network_helper.py honours it. You can also bypass project-ID auto-detection entirely by passing --project-id to the helper.
2. Credential Configuration

hcloud CLI supports two credential modes. See references/credential-configuration.md for full details.

Quick setup (choose one):

bash
# Mode A — Long-term AK/SK
export HUAWEI_CLOUD_AK=<your-ak>
export HUAWEI_CLOUD_SK=<your-sk>
export HUAWEI_CLOUD_REGION=cn-north-4
# Mode B — Temporary AK/SK + SecurityToken
export HUAWEI_CLOUD_AK=<your-temp-ak>
export HUAWEI_CLOUD_SK=<your-temp-sk>
export HUAWEI_CLOUD_SECURITY_TOKEN=<your-security-token>
export HUAWEI_CLOUD_REGION=cn-north-4
  • Security rules: Never expose AK/SK/SecurityToken values. Use hcloud configure list to check presence only.
⚠️ Known limitation — Python helper script credentials are independent of hcloud CLI: The Python helper script (scripts/cci_network_helper.py) uses HW_ACCESS_KEY / HW_SECRET_KEY (and optionally HW_SECURITY_TOKEN) environment variables for authentication, which are separate from hcloud CLI's credential source (profile or HUAWEI_CLOUD_AK/HUAWEI_CLOUD_SK). If the credentials in HW_ACCESS_KEY/HW_SECRET_KEY lack 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
bash
hcloud version
hcloud configure list

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
OperationRisk LevelDescription
Create EIPPool💰 BillableAuto-creates EIPs and bandwidth — recurring charges. Give the cost warning and get explicit confirmation before creating
Delete Namespace🔴 CriticalCascades — deletes ALL resources under this namespace (Network, Pods, Deployments, etc.)
Delete Network🟠 HighDisconnects namespace from VPC; running pods lose network
Delete Deployment🟠 HighTerminates all replicas of the workload
Delete StatefulSet🟠 HighTerminates all replicas; PVC data may be lost
Delete Pod🟠 HighTerminates the container instance
Delete EIPPool🟡 MediumReleases public IPs allocated to pods
Delete PVC (StatefulSet cleanup)🟠 HighDestroys 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 list to 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:

bash
hcloud CCI <Operation> --param=value --cli-region=<region> --cli-output=json
CCI-Specific Parameter Rules

CCI parameters follow Kubernetes API conventions — deeply nested objects with dot notation:

  1. Annotations use `{*}` format: --metadata.annotations.namespace-kubernetes-io/flavor=general-computing
  2. Labels use `{*}` format: --metadata.labels.app=my-app
  3. Containers array (1-based): --spec.template.spec.containers.1.name=main --spec.template.spec.containers.1.image=nginx
  4. Resources use `{*}` format: --spec.template.spec.containers.1.resources.limits.cpu=500m
  5. Selector matchLabels use `{*}` format: --spec.selector.matchLabels.app=my-app
  6. Namespaced operations require `--namespace`: all workload operations must specify namespace
⚠️ Critical: Before constructing any CCI command, always run hcloud CCI <Operation> --help to 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cci-instance-management/badge)](https://verified-skill.com/skills/huaweicloud/huaweicloud-skills/huawei-cloud-cci-instance-management)

Something wrong with this skill or its page? Tell us.