Skills

Nodegroup

NodeGroup operation Skill for the edgewize nodegroup project.

Install

npx skills add kubesphere/kubesphere --skill nodegroup -g -a claude-code -y
Repository
kubesphere/kubesphere17.1k
Category
Engineering
Updated
4mo ago
License
See repository
Context cost
Mediumabout 1,848 tokens
Runs scripts
Yes, review before use

What it does

NodeGroup operation Skill for the edgewize nodegroup project. Use this whenever the user wants to query, create, update, delete, bind, unbind, or troubleshoot NodeGroup resources, including node binding, namespace binding, workspace binding, and deployment/config inspection for nodegroup.

NodeGroup Operations

Purpose

Use this skill to perform real nodegroup-related operations in the edgewize-io/nodegroup environment.

This skill should help with:

  • listing and inspecting NodeGroup
  • creating, updating, patching, and deleting NodeGroup
  • binding and unbinding nodes
  • binding and unbinding namespaces
  • binding and unbinding workspaces
  • troubleshooting failed or incomplete nodegroup sync
  • checking deployment config under config/nodegroup

Prefer using the bundled script scripts/nodegroup_api.py for authenticated KAPI operations. Use kubectl only as a verification or fallback tool when the API path is unavailable.

Prerequisites

Use the bundled script:

  • scripts/nodegroup_api.py

Authentication model:

  • logs in against /oauth/token
  • stores token in ~/.kubesphere_token
  • uses KUBESPHERE_HOST, KUBESPHERE_USERNAME, KUBESPHERE_PASSWORD, and KUBESPHERE_TOKEN

Setup:

cd scripts
pip install requests
export KUBESPHERE_HOST="http://<kubesphere-host>"
python nodegroup_api.py login --username admin --password <password>

Token helpers:

python nodegroup_api.py clear-cache
python nodegroup_api.py request GET /kapis/infra.kubesphere.io/v1alpha1/nodegroups

Source of Truth

When you need to confirm how an operation works, read these files first from the nodegroup source repository root:

  • pkg/kapis/infra/v1alpha1/register.go
  • pkg/kapis/infra/v1alpha1/handler.go
  • pkg/kapis/infra/v1alpha1/workspace_handler.go
  • pkg/controller/nodegroup/nodegroup_controller.go
  • pkg/constants/constants.go

Do not invent unsupported operations. Base the workflow on the source repository.

Main Resources

NodeGroup

Cluster-scoped resource.

Important fields:

  • spec.alias
  • spec.description
  • spec.manager
  • status.state

Safe Operating Rules

Read the whole SKILL.md on GitHub

More in Engineering