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

kubesphere-multi-tenant-management

하는 일

이 스킬은 AI 에이전트가 KubeSphere의 테넌트를 설정하도록 돕습니다. 사용자, 워크스페이스, 프로젝트, 역할 바인딩이 포함됩니다. 공유 클러스터에서 누가 무엇에 접근할 수 있는지 관리하는 관리자를 위한 스킬입니다.

사용하는 경우

  • ✓기본 역할을 가진 새 사용자를 KubeSphere에 추가해야 할 때.
  • ✓새 팀에게 워크스페이스나 올바른 구성원이 있는 프로젝트가 필요한 경우.
  • ✓어떤 사람에게 필요한 가장 낮은 수준의 프로젝트 접근 권한을 주고 싶을 때.

스킬 링크

https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-multi-tenant-management/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“Maria라는 새 사용자를 추가해서 일반 접근 권한을 주고, 마케팅 워크스페이스에 일반 구성원으로 초대해 주실 수 있나요?”

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

작동 방식

에이전트는 사용자, 워크스페이스, 프로젝트를 만들거나 읽은 뒤, 맞는 내장 역할을 바인딩합니다. 가장 낮은 접근 수준부터 시작하고, 요청할 때만 올립니다.

기술 내용 (원본 SKILL.md)

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

KubeSphere Multi-Tenant Management

Security Guidelines

  1. Never use kubectl edit/delete - Do NOT use kubectl edit, kubectl delete, or similar commands to modify or delete workspaces, projects, users, roles, or role bindings. These operations are sensitive and should be performed via KubeSphere Console with proper approval workflow.

  2. Never perform delete operations via API - Do NOT delete users, workspaces, projects, roles, or role bindings via API. These operations must be performed manually via KubeSphere Console with proper approval workflow. Only use this skill for creating and querying resources.

  3. Never create custom roles - Do NOT create custom roles (Role, WorkspaceRole, GlobalRole). Only use built-in roles provided by KubeSphere. If custom permissions are needed, instruct the user to configure them via KubeSphere Console.

  4. Default to least privilege - When creating users or assigning permissions, always use the minimum required access level:

    • New user creation: default to platform-regular (not platform-admin)
    • Inviting user to workspace: default to <workspace-name>-regular (not admin)
    • Inviting user to project: default to viewer (not admin)
    • Only escalate permissions when explicitly requested

Core Concepts

Workspace

The top-level organizational unit in KubeSphere, representing a team, department, or business unit. A workspace can contain multiple projects and serves as the basic boundary for resource grouping and access control. Workspaces can span multiple clusters, enabling centralized management of resources distributed across different clusters.

Project

KubeSphere's enhanced Kubernetes namespace, representing a specific application, environment, or workload within a workspace. Each project maps to a separate namespace.

User & Role

  • User: KubeSphere account entity, can be platform admin, workspace member, or project member
  • Role: Permission set defined in KubeSphere's three-tier RBAC:

Project Roles (roles.iam.kubesphere.io):

  • admin: Full access to all resources
  • operator: Create/update/delete resources, cannot manage roles
  • viewer: Read-only access

Workspace Roles (WorkspaceRole, workspaceroles.iam.kubesphere.io):

  • <workspace-name>-admin: Full access to workspace and all projects
  • <workspace-name>-regular: Limited workspace access
  • <workspace-name>-self-provisioner: Create projects in workspace
  • <workspace-name>-viewer: Read-only access to workspace

Platform Roles (GlobalRole, globalroles.iam.kubesphere.io):

  • platform-admin: Full access to all resources
  • platform-regular: Limited platform access
  • platform-self-provisioner: Can create workspaces

Role Binding (KubeSphere API endpoints, binds roles to Users):

  • Project-level: /namespacemembers API, binds roles.iam.kubesphere.io to User
  • Workspace-level: /workspacemembers API, binds workspaceroles.iam.kubesphere.io to User
  • Platform-level: /users/<username> API, binds globalroles.iam.kubesphere.io to User via annotation

Step-by-Step Guide

Prerequisites

Set up authentication using the provided CLI tool. First, navigate to the scripts directory:

# Navigate to the skill's scripts directory
# Example path (replace with your actual kubesphere-skills location):
cd ~/kubesphere-skills/core/kubesphere-core/scripts

# Install required Python package
pip install requests


# Set host endpoint (optional, defaults to http://ks-apiserver.kubesphere-system)
export KUBESPHERE_HOST="http://<kubesphere-host>"

# Login to get token (token will be cached)
python ks_api.py --login --username admin --password <your-password>

# Token is cached in ~/.kubesphere_token and auto-refreshed

# Optional: Clear cached token
python ks_api.py --clear-cache

1. Create Workspace

Required parameters:

  • workspace-name: Name for the workspace (maps to metadata.name)
  • manager: Workspace manager (maps to spec.template.spec.manager, default to current login user)
  • creator: Creator name (maps to metadata.annotations["kubesphere.io/creator"])
  • clusters: List of cluster names to host this workspace (maps to spec.placement.clusters)
# Create workspace via Python CLI
python ks_api.py POST /kapis/tenant.kubesphere.io/v1beta1/workspacetemplates '{
  "apiVersion": "iam.kubesphere.io/v1beta1",
  "kind": "WorkspaceTemplate",
  "metadata": {
    "name": "<workspace-name>",
    "annotation
자주 묻는 질문

에이전트가 사용자나 프로젝트를 삭제할 수 있나요?

아니요. 삭제 작업은 KubeSphere 콘솔에서 직접 해야 한다고 스킬이 말합니다.

사용자 지정 역할을 만들 수 있나요?

아니요. 내장 역할만 쓰며, 사용자 지정 역할은 콘솔에서 설정해야 합니다.

기본 접근 수준은 무엇인가요?

가장 낮은 접근 권한이 기본입니다. 예를 들어 새 사용자는 일반, 프로젝트는 뷰어가 기본입니다.

상세 정보

작성자의 원본 설명

KubeSphere multi-tenant management Skill. Use when user requests to create users, workspaces, projects, or assign roles/permissions. Supports user lifecycle management, workspace configuration, project creation, role binding. Do not perform any delete operations, do not create custom roles.

repo: kubesphere/kubesphere

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬