본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)17k · #10782

nodegroup

하는 일

이 스킬은 AI 에이전트가 edgewize 환경의 NodeGroup 리소스를 다루도록 돕습니다. 노드를 묶고 네임스페이스나 워크스페이스에 배정하는 운영자를 위한 스킬입니다.

사용하는 경우

  • ✓NodeGroup을 만들고 노드를 추가하고 싶을 때.
  • ✓네임스페이스나 워크스페이스를 NodeGroup에 바인딩하거나 바인딩을 제거해야 하는 경우.
  • ✓NodeGroup의 동기화가 끝나지 않아서 원인을 찾아야 할 때.

스킬 링크

https://github.com/kubesphere/kubesphere/blob/master/skills/nodegroup/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/kubesphere/kubesphere/blob/master/skills/nodegroup/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“edge-east라는 NodeGroup을 만들고 노드 edge-1과 edge-2를 추가해서 east 워크스페이스에 바인딩해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 동봉된 스크립트로 KubeSphere API에 로그인하고 NodeGroup 작업을 실행합니다. kubectl은 결과를 확인하거나 대체 수단으로만 사용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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-only requests: prefer python nodegroup_api.py ... query commands.
  • Write requests: perform only the exact requested change.
  • Do not delete resources unless the user explicitly asks for deletion.
  • For destructive or potentially disruptive actions such as node unbind or delete, confirm impact in your response if the request is ambiguous.
  • When changing bindings, verify the current state first, then apply the change, then verify the result.

Preferred Operation Flow

For any write operation, follow this order:

  1. Inspect the current resource.
  2. Apply the minimal required change.
  3. Verify the resulting resource and any affected node, namespace, or workspace.
  4. If sync looks wrong, inspect labels, annotations, and controller behavior.

Core Commands

1. Query NodeGroups

python nodegroup_api.py nodegroup list
python nodegroup_api.py nodegroup get <name>

2. Create a NodeGroup

python nodegroup_api.py nodegroup create \
  --name <nodegroup-name> \
  --alias "<alias>" \
  --description "<description>" \
  --manager "<manager>"
python nodegroup_api.py nodegroup get <nodegroup-name>

3. Update or Patch a NodeGroup

Prefer patching for small changes.

python nodegroup_api.py nodegroup patch <name> \
  --alias "<new-alias>" \
  --description "<new-description>" \
  --manager "<manager>"
python nodegroup_api.py nodegroup get <name>

For unsupported fields or ad hoc testing, use raw request mode.

For PATCH, send a JSON Patch array:

python nodegroup_api.py request PATCH /kapis/infra.kubesphere.io/v1alpha1/nodegroups/<name> '[{"op":"add","path":"/spec/alias","value":"<new-alias>"}]'

4. Delete a NodeGroup

Only do this when explicitly requested.

python nodegroup_api.py nodegroup delete <name>

If delete hangs, inspect finalizers:

python nodegroup_api.py nodegroup get <name>

Relevant finalizer:

  • finalizers.nodegroups.kubesphere.io

5. Bind or Unbind a Node

Node binding is implemented through nodegroup APIs and reflected with label:

  • apps.edgewize.io/nodegroup=<nodegroup-name>

Read current state:

kubectl get node <node-name> --show-labels
kubectl get nodes -l apps.edgewize.io/nodegroup=<nodegroup-name>

Operate through the bundled script:

python nodegroup_api.py bind node --nodegroup <nodegroup-name> --node <node-name>
python nodegroup_api.py unbind node --nodegroup <nodegroup-name> --node <node-name>

# Verify
kubectl get nodes -l apps.edgewize.io/nodegroup=<nodegroup-name>
kubectl get node <node-name> -o yaml

6. Bind or Unbind a Namespace

Read current s

자주 묻는 질문

에이전트는 어떻게 로그인하나요?

환경 변수로 설정한 호스트와 인증 정보로 API에 로그인하고, 토큰은 로컬에 저장합니다.

NodeGroup을 삭제할 수 있나요?

네. NodeGroup 삭제와 노드, 네임스페이스, 워크스페이스의 바인딩 해제를 다룹니다.

API를 쓸 수 없으면 어떻게 하나요?

에이전트는 상태를 확인하기 위해 kubectl로 대체할 수 있습니다.

상세 정보

작성자의 원본 설명

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.

repo: kubesphere/kubesphere

인기도

GitHub 스타
17k
순위
#10782
라이선스
—
업데이트
2026. 7. 14.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬