Install
openclaw skills install ucs-cluster-onboarding-managerHuawei Cloud UCS (Universal Cloud Service) cluster onboarding, lifecycle, and fleet grouping management skill using hcloud CLI. Use this skill when the user wants to: (1) register self-managed or CCE clusters to UCS - register/query/remove, (2) manage cluster lifecycle - update/query/list clusters, (3) manage fleet groups - create/delete/query cluster groups, (4) obtain cluster access information and kubeconfig, (5) download federation kubeconfig for multi-cluster access, (6) check UCS resource quotas. Trigger: user mentions "UCS cluster onboarding", "UCS 集群纳管", "UCS cluster registration", "UCS 注册集群", "UCS fleet", "UCS 舰队", "UCS 集群组", "cluster group", "fleet grouping", "UCS kubeconfig", "UCS 集群接入", "UCS federation", "UCS 联邦", "UCS 配额", "cluster lifecycle", "集群生命周期", "managed clusters", "纳管集群", "集群管理"
openclaw skills install ucs-cluster-onboarding-managerThis skill provides cluster onboarding, lifecycle, and fleet grouping management capabilities for Huawei Cloud UCS (Universal Cloud Service) using the hcloud CLI.
Architecture: hcloud CLI → UCS Service API → Cluster/ClusterGroup/AccessConfig/KubeConfig resources
Related Skills:
ucs-policy-governor - UCS policy governance, compliance, and audit managementCapabilities:
Typical Use Cases:
hcloud version to verify installationprintf "y\n" | hcloud version to accept privacy statementecho $HUAWEI_CLOUD_AK or echo $HUAWEI_CLOUD_SK to check credentialsHUAWEI_CLOUD_AK, HUAWEI_CLOUD_SK, HUAWEI_CLOUD_REGIONConfiguration Method (Environment Variables Only):
export HUAWEI_CLOUD_AK=<your-ak>
export HUAWEI_CLOUD_SK=<your-sk>
export HUAWEI_CLOUD_REGION=cn-north-4
⚠️ Important Security Notes:
| API Action | Permission | Purpose |
|---|---|---|
ucs:cluster:create | Register cluster | Register cluster to UCS |
ucs:cluster:delete | Delete cluster | Remove cluster from UCS |
ucs:cluster:get | Get cluster | View cluster details |
ucs:cluster:list | List clusters | List all managed clusters |
ucs:cluster:update | Update cluster | Modify cluster properties |
ucs:clusterGroup:create | Create group | Create fleet group |
ucs:clusterGroup:delete | Delete group | Remove fleet group |
ucs:clusterGroup:get | Get group | View fleet group details |
ucs:clusterGroup:update | Update group | Update fleet group description |
ucs:clusterAccess:get | Get access info | Obtain cluster access information |
ucs:quota:get | Get quota | Check UCS resource quotas |
ucs:kubeconfig:create | Create kubeconfig | Obtain cluster kubeconfig |
ucs:federationKubeconfig:get | Get federation | Download federation kubeconfig |
See IAM Permission Policies for complete policy JSON.
Permission Failure Handling:
references/iam-policies.mdSee Task: Cluster Registration for detailed workflows.
RegisterCluster uses Kubernetes API-style parameters (apiVersion, kind, metadata., spec.).
# Register a CCE cluster to UCS
hcloud UCS RegisterCluster --apiVersion=v1 --kind=Cluster --metadata.name=prod-backend-cluster --spec.category=self --spec.provider=huaweicloud --spec.type=cce --spec.manageType=grouped --spec.country=CN --spec.city=110000 --metadata.uid=<cce-cluster-id> --spec.projectID=<project-id> --spec.region=cn-north-4 --cli-region=cn-north-4
# Register a CCE cluster and assign to fleet group at registration
hcloud UCS RegisterCluster --apiVersion=v1 --kind=Cluster --metadata.name=prod-backend-cluster --spec.category=self --spec.provider=huaweicloud --spec.type=cce --spec.manageType=grouped --spec.country=CN --spec.city=110000 --metadata.uid=<cce-cluster-id> --spec.projectID=<project-id> --spec.region=cn-north-4 --spec.clusterGroupID=<group-id> --cli-region=cn-north-4
# Register a self-managed/attached cluster
hcloud UCS RegisterCluster --apiVersion=v1 --kind=Cluster --metadata.name=datacenter-k8s --spec.category=onpremise --spec.provider=self_managed --spec.type=Kubernetes --spec.manageType=discrete --spec.country=CN --spec.city=110000 --metadata.annotations.kubeconfig=<kubeconfig-yaml-content> --cli-region=cn-north-4
# Retry cluster activation (if registration stuck)
hcloud UCS RetryClusterActivation --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Remove a cluster from UCS
hcloud UCS DeleteCluster --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
Cluster Categories (spec.category):
self: Huawei Cloud CCE (Cloud Container Engine) managed clusteronpremise: Self-managed or third-party Kubernetes clusterCluster Providers (spec.provider):
huaweicloud: Huawei Cloud managed CCE clusterself_managed: Self-managed Kubernetes clusterManage Types (spec.manageType):
grouped: Cluster managed within a fleet groupdiscrete: Cluster managed independently# Show cluster details
hcloud UCS ShowCluster --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# List managed clusters (with pagination)
hcloud UCS ShowClusterList --limit=20 --offset=0 --cli-region=cn-north-4
# List managed clusters with filters
hcloud UCS ShowClusterList --category=CCE --enablestatus=Available --clustergroupid=<group-id> --cli-region=cn-north-4
# List all managed clusters (with optional unimported flag)
hcloud UCS ListManagedClusters --cli-region=cn-north-4
hcloud UCS ListManagedClusters --unimported --cli-region=cn-north-4
# Update cluster properties (K8s API-style params)
hcloud UCS UpdateCluster --clusterid=<ucs-cluster-id> --apiVersion=v1 --kind=Cluster --spec.city=Shanghai --spec.country=CN --cli-region=cn-north-4
# Show cluster access information
hcloud UCS ShowClusterAccessInfo --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Show cluster access information with optional filters
hcloud UCS ShowClusterAccessInfo --clusterid=<ucs-cluster-id> --region=cn-north-4 --vpcendpoint=<vpc-id> --cli-region=cn-north-4
ShowClusterList Valid Filter Parameters:
--category: Filter by cluster category (self, onpremise)--clustergroupid: Filter by fleet group ID--clusterids: Filter by specific cluster IDs--enablestatus: Filter by cluster status (Available, Unavailable)--managetype: Filter by manage type (grouped, discrete)--limit: Pagination limit--offset: Pagination offset--order: Sort order (asc, desc)--order_by: Sort fieldSee Task: Fleet Management for detailed workflows.
# Create a fleet group
hcloud UCS RegisterClusterGroup --metadata.name=production-fleet --spec.description="All production clusters" --spec.clusterIds.1=<cluster-id-1> --cli-region=cn-north-4
# List all fleet groups
hcloud UCS ListClusterGroup --limit=20 --offset=0 --cli-region=cn-north-4
# Show fleet group details
hcloud UCS ShowClusterGroup --clustergroupid=<group-id> --cli-region=cn-north-4
# Update fleet group description
hcloud UCS UpdateClusterGroup --clustergroupid=<group-id> --description="Updated fleet description" --cli-region=cn-north-4
# Add clusters to fleet group
hcloud UCS UpdateClusterGroupAssociatedClusters --clustergroupid=<group-id> --clusterIds.1=<cluster-id-1> --clusterIds.2=<cluster-id-2> --cli-region=cn-north-4
# Add a single cluster to fleet group (join)
hcloud UCS JoinGroup --clusterid=<ucs-cluster-id> --clusterGroupID=<group-id> --cli-region=cn-north-4
# Remove a cluster from fleet group (leave)
hcloud UCS LeaveGroup --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Delete a fleet group
hcloud UCS DeleteClusterGroup --clustergroupid=<group-id> --cli-region=cn-north-4
See Task: Access Management for detailed workflows.
# Get kubeconfig for a specific cluster
hcloud UCS CreateClusterKubeconfig --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Create cluster configuration
hcloud UCS CreateClusterConf --clusterid=<ucs-cluster-id> --cli-region=cn-north-4
# Download federation kubeconfig (for multi-cluster access)
hcloud UCS DownloadFederationKubeconfig --clustergroupid=<group-id> --duration=3600 --cli-region=cn-north-4
DownloadFederationKubeconfig Required Parameters:
--clustergroupid: Fleet group ID (required path parameter)--duration: Token validity duration in seconds (required integer body parameter)# Show UCS resource quotas (domainid is required - account ID)
hcloud UCS ShowQuota --domainid=<account-id> --cli-region=cn-north-4
| Parameter | Required/Optional | Description | Default |
|---|---|---|---|
--cli-region | Required | Huawei Cloud region ID | Config value or HUAWEI_CLOUD_REGION |
--clusterid | Context-dependent | UCS cluster ID | N/A |
--clustergroupid | Context-dependent | Fleet group ID | N/A |
| Parameter | Required | Description | Constraints |
|---|---|---|---|
--apiVersion | Yes | API version (always v1) | Must be v1 |
--kind | Yes | Resource kind (always Cluster) | Must be Cluster |
--metadata.name | Yes | Cluster display name | 1-128 chars |
--spec.category | Yes | Cluster category | self or onpremise |
--spec.provider | Yes | Cluster provider | huaweicloud or self_managed |
--spec.type | Yes | Cluster type | cce, baremetal, Kubernetes, etc. |
--spec.manageType | Yes | Management type | grouped or discrete |
--spec.country | Yes | Country code | Country code (e.g., CN) |
--spec.city | Yes | City code | City code (e.g., 110000 for Beijing) |
--metadata.uid | CCE only | CCE cluster ID | Must reference existing CCE cluster |
--spec.projectID | CCE only | Project ID | Valid Huawei Cloud project ID |
--spec.region | CCE only | CCE cluster region | Must match CCE cluster region |
--metadata.annotations.kubeconfig | Self-managed only | Kubeconfig content | Valid Kubernetes kubeconfig YAML |
--spec.clusterGroupID | No | Assign to fleet at registration | Valid fleet group ID |
--metadata.labels.* | No | Custom labels | Key-value pairs |
| Parameter | Required | Description | Constraints |
|---|---|---|---|
--clusterid | Yes | UCS cluster ID (path param) | Must be registered cluster |
--apiVersion | Yes | API version (always v1) | Must be v1 |
--kind | Yes | Resource kind (always Cluster) | Must be Cluster |
--spec.city | No | Update city | City name |
--spec.country | No | Update country | Country code |
--metadata.annotations | No | Update annotations | Key-value pairs |
--spec.workerConfig.replicas | No | Update worker replicas | Integer |
--spec.workerConfig.strategy.* | No | Update worker strategy | K8s deployment strategy fields |
| Parameter | Required | Description | Constraints |
|---|---|---|---|
--metadata.name | Yes (create) | Group display name | 1-128 chars |
--spec.description | No (create) | Group description | Free text |
--spec.clusterIds.N | No (create) | Initial cluster IDs | Indexed (1, 2, 3...) |
--clustergroupid | Yes (get/delete/update) | Group ID | UUID format |
--description | Yes (UpdateClusterGroup) | New description | Free text |
--clusterIds.N | Yes (UpdateClusterGroupAssociatedClusters) | Cluster IDs to add | Indexed |
| Parameter | Required | Description | Constraints |
|---|---|---|---|
--clusterid | Yes | UCS cluster ID (path) | Must be registered cluster |
--clusterGroupID | Yes (JoinGroup) | Fleet group ID (body) | Valid fleet group ID |
| Parameter | Required | Description | Constraints |
|---|---|---|---|
--clusterid | Yes | UCS cluster ID | Must be registered cluster |
--clustergroupid | Yes (DownloadFederationKubeconfig) | Fleet group ID | Valid fleet group ID |
--duration | Yes (DownloadFederationKubeconfig) | Token duration in seconds | Integer |
| Parameter | Required | Description | Constraints |
|---|---|---|---|
--domainid | Yes | Account ID | Huawei Cloud account/domain ID |
| Parameter | Required/Optional | Description |
|---|---|---|
--category | Optional | Filter by cluster category |
--clustergroupid | Optional | Filter by fleet group ID |
--clusterids | Optional | Filter by specific cluster IDs |
--enablestatus | Optional | Filter by cluster status |
--managetype | Optional | Filter by manage type |
--limit | Optional | Pagination limit |
--offset | Optional | Pagination offset |
--order | Optional | Sort order (asc/desc) |
--order_by | Optional | Sort field |
See Output Format for detailed response format examples (ShowCluster, ShowClusterList, ShowQuota).
Key Fields Summary:
metadata.uid (UUID), spec.category (onpremise/self), status.phase (Failed/Available)items[] (k8s-style array), total (count)quotas.resources[] with type/quota/used/min/maxSee Verification Method for step-by-step verification.
prod-app-backend, staging-data-pipeline) via --metadata.name--metadata.annotations.kubeconfig--duration for federation kubeconfig tokens based on usage patterns| Document | Description |
|---|---|
| UCS Cluster Onboarding API Guide | hcloud UCS API reference |
| Output Format | Response format examples (verified) |
| IAM Permission Policies | Required permissions and policy JSON |
| Verification Method | Step-by-step verification |
| Common Pitfalls | Troubleshooting guides |
| Task: Cluster Registration | Registration and deregistration workflows |
| Task: Fleet Management | Fleet group workflows |
| Task: Access Management | Kubeconfig and access control workflows |
--metadata.annotations.kubeconfighcloud UCS <Operation> format--clustergroupid and --duration are requiredspec.category uses self/onpremise (not CCE/AttachedCluster), spec.provider uses huaweicloud (not huawei_cloud), spec.type uses lowercase cce (not CCE), spec.city uses city codes like 110000 (not city names like Beijing)See Common Pitfalls & Solutions for detailed troubleshooting guides.
Quick Reference:
| Pitfall | Symptom | Quick Fix |
|---|---|---|
| Invalid kubeconfig | Registration fails | Verify kubeconfig validity and API server reachability |
| Cluster already registered | 409 Conflict | Use ShowCluster to check existing registration |
| CCE cluster not found | 404 Not Found | Verify CCE cluster ID via --metadata.uid in same region |
| Quota exceeded | 403 Quota limit | Check quotas with ShowQuota --domainid=<account-id> |
| Fleet group already exists | 409 Conflict | Use ShowClusterGroup to check first |
| Deregistration impact | Policies stop working | Consider disabling policies before deregistration |
| Federation kubeconfig expired | Multi-cluster access fails | Re-download with DownloadFederationKubeconfig --clustergroupid=<id> --duration=N |
| Wrong parameter names | Command fails or unrecognized | Use --clusterid (not --cluster_id), --clustergroupid (not --group_id) |
| Using --name on ShowClusterList | Parameter not recognized | Use --category, --clustergroupid, --enablestatus filters instead |
| Missing domainid on ShowQuota | Missing required parameter | Provide --domainid=<account-id> |
| Missing duration on DownloadFederationKubeconfig | Missing required parameter | Provide --duration=<seconds> |