Install
openclaw skills install @erickeyhu-hug/huawei-cloud-kubectl-cce-installerInstall, upgrade, verify, or troubleshoot local kubectl and the Huawei Cloud kubectl-cce plugin. Trigger when a user asks to install kubectl, install kubectl-cce, configure the CCE kubectl plugin, verify kubectl-cce availability, or repair local command prerequisites for CCE Kubernetes resource access.
openclaw skills install @erickeyhu-hug/huawei-cloud-kubectl-cce-installerInstall and verify the local kubectl and kubectl-cce prerequisites used for Huawei Cloud CCE Kubernetes resource access. This skill changes only the local machine; it never creates, updates, or deletes cloud or Kubernetes resources.
Architecture: scripts/install_kubectl_cce.sh -> local OS package paths and official download/source repositories -> kubectl and kubectl-cce binaries -> kubectl plugin list verification.
Execution Method: Run the bundled shell script only. Do not replace its download URLs, build tags, installation paths, or verification steps with ad hoc commands unless the user explicitly asks for a different method.
Capabilities:
kubectl package from Huawei Cloud OBS for the local architecturekubectl-cce v0.1.0 from its Gitee Release on Linux when availablekubectl-cce v0.1.0 source tag when a Release asset is unavailable or download failskubectl and kubectl-cce plugin discovery after installationTypical Use Cases:
curl, tar, cp, and chmod for Linux/macOS installationgit and Go only when source-build fallback is needed--bin-dir; /usr/local/bin normally requires elevationInstallation itself needs no Huawei Cloud credentials. Do not request, print, or save AK/SK, security tokens, IAM tokens, or kubeconfig content during installation.
After installation, kubectl cce requires credentials only when it accesses a CCE cluster. Read plugin-usage.md before configuring that access.
| Permission | Purpose |
|---|---|
| Read/execute access | Detect existing kubectl and kubectl-cce executables |
Write access to --bin-dir | Install a missing executable |
| Elevated local permission when required | Write to protected directories such as /usr/local/bin |
Permission Failure Handling:
sudo automatically.All commands use the bundled installer script:
bash scripts/install_kubectl_cce.sh [--check] [--execute] [--bin-dir <directory>]
bash scripts/install_kubectl_cce.sh --check
This is read-only. It reports the OS, architecture, installed binaries, kubectl client version, and kubectl plugin list output.
bash scripts/install_kubectl_cce.sh --bin-dir /usr/local/bin
This is read-only. It shows which executables are missing and the exact download or source-build fallback without changing the machine.
sudo bash scripts/install_kubectl_cce.sh --execute --bin-dir /usr/local/bin
Run only after the user confirms the previewed installation path and actions. The script does not overwrite existing kubectl or kubectl-cce executables.
amd64 or arm64 architecture. Package names determine release ordering.kubectl-cce v0.1.0 asset is unavailable or download fails, build the fixed v0.1.0 source tag.kubectl-cce v0.1.0 from source because the Release has no macOS asset.The fallback requires git and Go. If either is absent, return the missing dependency rather than installing it automatically.
The bundled script does not run on Windows. Download the matching Windows kubectl binary from the official Kubernetes release site and the matching kubectl-cce ZIP from the Gitee v0.1.0 Release. Extract the files, place them in a user-selected directory on PATH, and verify with kubectl version --client and kubectl plugin list. See plugin-usage.md for the plugin-specific steps.
This skill modifies only local binaries and does not operate on cloud resources. It must still use a plan-and-confirm flow for system changes.
| Level | Meaning | Execution Guidance |
|---|---|---|
| R3 | Read-only local inspection | May run automatically |
| R1 | Local executable installation, replacement, or PATH-adjacent system change | Show the plan first and require explicit user confirmation before --execute |
| Operation | Risk Level | Description |
|---|---|---|
--check | R3 | Inspect local tools and plugin discovery |
| Default script mode | R3 | Show installation plan without making changes |
--execute | R1 | Install missing binaries into the selected directory |
| Source-build fallback | R1 | Clone fixed source tags and compile missing binaries |
| Parameter | Required/Optional | Description | Default |
|---|---|---|---|
--check | Optional | Run only local inspection and verification | Disabled |
--execute | Required for mutation | Install missing binaries after explicit confirmation | Disabled |
--bin-dir <directory> | Optional | Target directory for newly installed executables | /usr/local/bin |
--help | Optional | Display script usage | N/A |
Set KUBECTL_CCE_CONNECT_TIMEOUT, KUBECTL_CCE_DOWNLOAD_TIMEOUT, KUBECTL_CCE_SOURCE_CLONE_TIMEOUT, or KUBECTL_CCE_SOURCE_BUILD_TIMEOUT to positive integer seconds only when the default timeout is unsuitable.
The installer may inspect the local machine without confirmation, but installation is an R1 local-system change. Confirm the following values with the user before running --execute.
| Parameter | Resolution | Confirmation Requirement |
|---|---|---|
| Installation mode | --check and the default plan are read-only; --execute installs missing binaries | Explicit confirmation required for --execute |
--bin-dir | Defaults to /usr/local/bin; may be changed to a writable user-selected directory | Confirm the target directory before installation |
| Existing executables | Detected from PATH; the script does not overwrite them | Report the detected state; do not replace an executable without a separately approved workflow |
| Network timeouts | Use defaults unless the user provides positive integer overrides | Confirm non-default values when they materially extend the wait time |
Never infer a writable installation directory, use sudo automatically, or install a missing build dependency without the user's explicit approval.
The script writes human-readable output to standard output and exits nonzero when it cannot complete the requested operation.
Key output fields:
platform: detected operating systemarch: normalized CPU architecturekubectl_present: whether kubectl is in PATHkubectl_cce_present: whether kubectl-cce is in PATHbin_dir: selected installation directoryPLAN: planned changes in no-change mode--check and record the current local state.--bin-dir.--execute.kubectl version --client and kubectl plugin list.Run the read-only check first:
bash scripts/install_kubectl_cce.sh --check
After a confirmed installation, verify:
kubectl version --client
kubectl plugin list
The plugin is ready when kubectl plugin list contains kubectl-cce. Do not rely on kubectl cce --version: the source tag does not expose a stable version flag.
--check and the no-change plan first.--bin-dir before asking for confirmation.--execute as an upgrade mechanism unless the user explicitly asks for replacement support.kubectl-cce must be named exactly kubectl-cce for Kubernetes plugin discovery.| Symptom | Likely Cause | Action |
|---|---|---|
curl, tar, cp, or chmod is missing | Local prerequisite is absent | Install the missing local prerequisite through the user-approved system method, then retry |
| Download fails | Network restriction or unavailable Release asset | Allow the script to use its fixed-tag source-build fallback after confirmation |
| Network step times out | Endpoint, proxy, or connection is slow or unavailable | Check connectivity, then increase the relevant KUBECTL_CCE_*_TIMEOUT value if the user approves |
| Source build fails | git/Go missing or source build dependency failure | Install the reported build prerequisite, then rerun the plan and confirmed installation |
Permission denied in --bin-dir | Protected target directory | Select a writable directory or run an explicitly approved elevated command |
| Plugin not listed | Target directory is not in PATH | Add the selected --bin-dir to PATH, then rerun kubectl plugin list |
| macOS plugin missing | v0.1.0 has no macOS Release asset | Use the fixed v0.1.0 source-build fallback |
| Document | Use |
|---|---|
| Plugin Usage | kubectl-cce credentials, read-only CCE connectivity test, and Windows installation |
| Acceptance Criteria | Installation, verification, safety, and documentation acceptance gates |