跳到正文
cccskills
免费在 GitHub 公开

kubesphere-extension-management

Manage KubeSphere extensions from discovery through installation, configuration, upgrades, and removal. Check dependencies and exact versions, prepare an InstallPlan deployment resource, and inspect status and logs to investigate installation or upgrade failures.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

KubeSphere extension management Skill. Use when user requests to install, configure, upgrade, uninstall extensions, or query extension info/troubleshoot issues. Includes extension discovery, dependency management, install configuration, version management.

集成工具Kubernetes
查看安装方法

适用场景

  • Find extensions and available versions
  • Install a specific extension version
  • Change settings or upgrade an extension
  • Investigate installation and upgrade failures
  • Uninstall an extension

包含的文件(2)

  • SKILL.md11.8 KB
  • evals/evals.json7.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

KubeSphere Extension Management


Architecture

┌──────────────────────┐        ┌─────────────────────────────┐        ┌──────────────────────┐        ┌──────────────────────┐
│  Extension Museum    │        │  Extension                  │        │  InstallPlan         │        │  Deployed Extension  │
│  (Local Chart Repo)  │───────▶│  - description              │───────▶│  - extension         │───────▶│                      │
│                      │ (sync) │  - status                   │        │  - config            │        │  Namespace: <target> │
└──────────────────────┘        │  ExtensionVersion           │        │  - clusterScheduling │        │  └── Pods, Services   │
                                │  - version                  │        └──────────────────────┘        └──────────────────────┘
                                │  - chartURL                 │              │ (reconcile)
                                │  - externalDependencies     │              |
                                │  - installationMode         │              |
                                └─────────────────────────────┘              ▼
                                                                    ┌──────────────────────┐
                                                                    │  Job                 │
                                                                    │  helm-upgrade-<name> │
                                                                    │  - helm install/     │
                                                                    │    upgrade/uninstall │
                                                                    └──────────┬───────────┘
                                                                               │
                                                                               ▼
                                                                    ┌──────────────────────┐
                                                                    │  Pod                 │
                                                                    │  (Helm execution)    │
                                                                    └──────────────────────┘

Core Concepts

Extension

Metadata and status for available/installed extensions.

FieldDescriptionExample
metadata.nameExtension namewhizard-monitoring
spec.versions[]Available versions[1.2.0, 1.2.1]
status.stateCurrent stateInstalled/Upgrading/Failed
status.enabledEnabled statustrue/false
status.installedVersionInstalled version1.2.1

ExtensionVersion

Version-specific details: Helm chart location, dependencies, requirements.

FieldDescriptionExample
metadata.nameVersion resource namewhizard-monitoring-1.2.1
spec.versionVersion number1.2.1
spec.chartURLHelm chart URLhttps://extensions-museum.../whizard-monitoring-1.2.1.tgz
spec.namespaceTarget namespacekubesphere-monitoring-system
spec.installationModeInstall modeMulticluster/HostOnly
spec.ksVersionRequired KS version>=4.2.0-0
spec.externalDependencies[]Required extensions[name: whizard-telemetry]

InstallPlan

Trigger for install/upgrade/uninstall. Creates Helm Job to deploy components.

Spec:

FieldTypeRequiredDescription
metadata.namestring✅Must match spec.extension.name
spec.extension.namestring✅Extension name
spec.extension.versionstring✅Exact version to install
spec.enabledbool✅Enable extension
spec.upgradeStrategystring✅Use Manual for production
spec.configstring❌Custom YAML config
spec.clusterSchedulingobject❌Multi-cluster config (Multicluster mode only)

Status:

FieldDescription
status.stateInstalled/Installing/Upgrading/Failed
status.jobNameHelm upgrade Job name
status.targetNamespaceTarget namespace
status.conditions[]Status conditions with messages

⚠️ CRITICAL:

  • metadata.name = spec.extension.name
  • Use EXACT version from user request
  • Set enabled: true and upgradeStrategy: Manual

Step-by-Step Workflow

1. List and Inspect Extensions

# List all extensions
kubectl get extensions

# List by category
for c in $(kubectl get categories.kubesphere.io -o jsonpath='{.items[*].metadata.name}'); do
 exts=$(kubectl get extensions.kubesphere.io -l kubesphere.io/category="$c" -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}')
 [ -n "$exts" ] && echo -e "$c:\n$exts"
done

# List extension available versions
kubectl get extensionversions.kubesphere.io -l kubesphere.io/extension-ref=<extension-name>

# View extension details
kubectl describe extension <extension-name>
kubectl describe extensionversion.kubesphere.io <extension-name>-<version>

2. Install Extension

⚠️ CRITICAL:

  • InstallPlan metadata.name MUST match spec.extension.name
  • Use EXACT version from user request (not recommendedVersion or latest)

2.1 Verify Version Exists

# Verify the extension and version exist before creating InstallPlan
kubectl get extension <extension-name>
kubectl get extensionversion <extension-name>-<version>

# Get version details (check installationMode, namespace, dependencies, etc.)
kubectl describe extension <extension-name>
kubectl describe extensionversion <extension-name>-<version>

2.2 Create InstallPlan

Based on the extension details above:

  • config: Omit if user didn't request custom configuration
  • clusterScheduling: Only include if installationMode=Multicluster, specify clusters in placement.clusters
apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
  name: <extension-name>
spec:
  # clusterScheduling:    # Only for Multicluster extensions.
  #   placement:
  #     clusters:
  #     - <cluster-name>
  #   overrides:
  #     host: |-
  #       # Extension agent configuration: custom settings for the extension agent in the current cluster, with higher priority than the global extension configuration.
  # 
  #       custom:
  #         key: override-value
  # config: |  ## Omit if user didn't request custom config
  #   # Custom configuration for the extension, serving as a global extension configuration that can override default settings.
  # 
  #   custom:
  #     key: override-value
  enabled: true
  extension:
    name: <extension-name>     # CRITICAL: MUST match metadata.name
    version: <version>         # CRITICAL: Use EXACT version requested
  upgradeStrategy: Manual
kubectl apply -f installplan-<extension-name>.yaml

3. Track & Verify Installation

# Watch status
kubectl get installplan <extension-name> -w

# Get details
kubectl describe installplan <extension-name>

# Verify extension status
kubectl describe extension <extension-name>

# Check deployed resources
NAMESPACE=$(kubectl get installplan <extension-name> -o jsonpath='{.status.targetNamespace}')
kubectl get pods,svc -n $NAMESPACE

4. Update & Upgrade Extension

⚠️ CRITICAL: InstallPlan metadata.name MUST match spec.extension.name

  • Update: Modify spec.config or spec.clusterScheduling (version unchanged)
  • Upgrade: Modify spec.extension.version to new version
# Get current InstallPlan as template
kubectl get installplan <extension-name> -o yaml > installplan-<extension-name>.yaml

# Edit and apply:
# - For Update: modify spec.config or spec.clusterScheduling
# - For Upgrade: change spec.extension.version to target version
kubectl apply -f installplan-<extension-name>.yaml
kubectl get installplan <extension-name> -w

5. Uninstall Extension

kubectl delete installplan <extension-name>

Best Practices

  • Use default config (omit spec.config) unless custom values are needed
  • Always use upgradeStrategy: Manual for production
  • Use exact version (not recommendedVersion or latest)
  • Test in staging before production
  • Review changelogs before upgrades
  • Document custom configurations

Troubleshooting

Issue 1: InstallPlan Failed (Job Execution Failed)

Symptoms: InstallPlan stuck in "Installing"/"Upgrading", Job pod shows Error/Failed

Diagnosis:

# Step 1: Check InstallPlan status
kubectl describe installplan <extension-name>
# Check status.state and status.conditions

# Step 2: Check Job pod logs
NAMESPACE=$(kubectl get installplan <extension-name> -o jsonpath='{.status.targetNamespace}')
JOB_NAME=$(kubectl get installplan <extension-name> -o jsonpath='{.status.jobName}')
kubectl logs -n $NAMESPACE -l job-name=$JOB_NAME --tail=100

# Step 3: For Multicluster - check cluster scheduling status
kubectl get installplan <extension-name> -o jsonpath='{.status.clusterSchedulingStatuses}' | jq .
# Check each cluster's state and conditions, then get job name and logs

Solutions:

  • Verify extension version exists
  • Check dependencies are installed
  • Check config syntax

Issue 2: InstallPlan Status Not Updated (Job Completed)

Symptoms: Job pod completed successfully, but InstallPlan stays in "Installing"/"Upgrading"

Diagnosis:

# Check if job completed
NAMESPACE=$(kubectl get installplan <extension-name> -o jsonpath='{.status.targetNamespace}')
JOB_NAME=$(kubectl get installplan <extension-name> -o jsonpath='{.status.jobName}')
kubectl get pods -n $NAMESPACE -l job-name=$JOB_NAME

# Check job completion time vs current time
kubectl get job $JOB_NAME -n $NAMESPACE -o jsonpath='{.status.completionTime}'

Cause: Clock skew between nodes (NTP not synchronized)

Solution: Check and synchronize NTP across all cluster nodes

Quick Reference

ActionCommand
List all extensionskubectl get extensions
List extension versionskubectl get extensionversions.kubesphere.io -l kubesphere.io/extension-ref=<name>
View extension detailskubectl describe extension <name>
View version detailskubectl describe extensionversion <name>-<version>
Install extensionkubectl apply -f installplan-<name>.yaml
Track installationkubectl get installplan <name> -w
Upgrade extensionModify version in InstallPlan, then kubectl apply
Uninstall extensionkubectl delete installplan <name>

References

Related Skills

  • kubesphere-core - Core platform architecture
  • kubesphere-cluster-management - Cluster operations

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Manage FrontendExtension resources in frontend-forge, from creation and package generation to downloading, publishing, and unpublishing. Inspect generated files, Kubernetes jobs, and status information to diagnose packaging or publishing failures.

中文简介正在准备中。当前显示英语简介。

  • Create or update a FrontendExtension
  • Rebuild and download an extension package
  • Publish, unpublish, or remove an extension
kubesphere/kubesphere1.7万2026年7月15日 更新

Operate FrontendIntegration resources from existing YAML definitions using kubectl, the Kubernetes command-line tool. Manage updates and enabled state, inspect build output, troubleshoot failures, and install or manage the frontend-forge extension.

中文简介正在准备中。当前显示英语简介。

  • Create a FrontendIntegration from existing YAML
  • Update, enable, or disable a FrontendIntegration
  • Inspect build output and troubleshoot failures
kubesphere/kubesphere1.7万2026年7月15日 更新

Generate FrontendIntegration YAML for frontend-forge from a simplified configuration containing one menu and one or more pages. Define resource tables or embedded iframe pages, with the bundled generator expanding menu placements into the required YAML structure.

中文简介正在准备中。当前显示英语简介。

  • Generating integration YAML for a CRD resource table
  • Defining an embedded iframe page
  • Converting a single-menu configuration into canonical YAML
kubesphere/kubesphere1.7万2026年7月15日 更新

kubeeye

免费

Set up KubeEye in KubeSphere to inspect Kubernetes clusters. Define checks for configurations, nodes, and services, schedule recurring or one-time inspections, and retrieve findings as HTML or spreadsheet reports.

中文简介正在准备中。当前显示英语简介。

  • Install KubeEye for cluster inspections
  • Create checks for node health and configuration
  • Schedule recurring cluster inspections
kubesphere/kubesphere1.7万2026年7月15日 更新

Inspect KubeSphere clusters with read-only commands. List clusters, view detailed configuration, identify host and member roles, and review connection types, readiness indicators, and KubeSphere and Kubernetes versions without changing cluster resources.

中文简介正在准备中。当前显示英语简介。

  • List clusters registered in KubeSphere
  • Check cluster readiness
  • Review KubeSphere and Kubernetes versions
kubesphere/kubesphere1.7万2026年7月15日 更新

Understand KubeSphere architecture and call its APIs with a script that handles authentication. This skill also directs cluster, user, workspace, and extension management requests to the relevant specialist skills.

中文简介正在准备中。当前显示英语简介。

  • Understand KubeSphere core components
  • Choose API paths for Kubernetes and KubeSphere operations
  • Send API requests to a specific member cluster
kubesphere/kubesphere1.7万2026年7月15日 更新

查看 kubesphere 的全部技能

报告此技能的问题