kubesphere-multi-tenant-management
KubeSphere multi-tenant management Skill
Install / Use
npx skills add kubesphere/kubesphere --skill kubesphere-multi-tenant-managementInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
SecuritySupported Platforms
Our assessment of kubesphere-multi-tenant-management
kubesphere-multi-tenant-management scores 82/100 on our quality scale, 510th of 658 Security skills we index.
Its SKILL.md is 12 KB long, well organised into 39 sections with 15 code examples: a thorough specification that gives an agent plenty to work with.
With 17,059 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so kubesphere-multi-tenant-management is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
kubesphere-multi-tenant-management compared with similar skills
All 4 of these similar skills score higher than kubesphere-multi-tenant-management; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| kubesphere-multi-tenant-management (this skill)by kubesphere | 82 | 17.1k | 2mo ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 4d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 4d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 5d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 130.2k | 5d ago | SKILL.md |
Frequently asked questions
- How do I install kubesphere-multi-tenant-management?
- Run
npx skills add kubesphere/kubesphere --skill kubesphere-multi-tenant-management. The install tabs above show the steps for each supported agent. - Which AI agents does kubesphere-multi-tenant-management work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is kubesphere-multi-tenant-management safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is kubesphere-multi-tenant-management still maintained?
- The repository was last updated about 2 months ago, so kubesphere-multi-tenant-management is actively maintained.
Skill content
View source on GitHubname: kubesphere-multi-tenant-management description: 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.
KubeSphere Multi-Tenant Management
Security Guidelines
-
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. -
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.
-
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.
-
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
- New user creation: default to
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 resourcesoperator: Create/update/delete resources, cannot manage rolesviewer: 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 resourcesplatform-regular: Limited platform accessplatform-self-provisioner: Can create workspaces
Role Binding (KubeSphere API endpoints, binds roles to Users):
- Project-level:
/namespacemembersAPI, bindsroles.iam.kubesphere.ioto User - Workspace-level:
/workspacemembersAPI, bindsworkspaceroles.iam.kubesphere.ioto User - Platform-level:
/users/<username>API, bindsglobalroles.iam.kubesphere.ioto 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 tometadata.name)manager: Workspace manager (maps tospec.template.spec.manager, default to current login user)creator: Creator name (maps tometadata.annotations["kubesphere.io/creator"])clusters: List of cluster names to host this workspace (maps tospec.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>",
"annotations": {
"kubesphere.io/creator": "<creator>"
}
},
"spec": {
"template": {
"spec": {
"manager": "<manager>"
},
"metadata": {
"annotations": {
"kubesphere.io/creator": "<creator>"
}
}
},
"placement": {
"clusters": [
{"name": "<cluster-name>"}
]
}
}
}'
Note: Before creating a workspace, always ask the user for:
- Workspace name (required)
- Manager (required, default to current login user)
- Clusters (required) - which cluster(s) to assign the workspace to
2. Create Project within Workspace
Required parameters:
project-name: Name for the project (maps tometadata.name)workspace-name: Name of the workspace to create the project in (maps tometadata.labels["kubesphere.io/workspace"])cluster-name: Cluster name to create the project in (maps to URI path andclusterfield)creator: Creator name (maps tometadata.annotations["kubesphere.io/creator"])
# Create project within workspace via Python CLI
python ks_api.py POST /clusters/<cluster-name>/kapis/tenant.kubesphere.io/v1beta1/workspaces/<workspace-name>/namespaces '{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"labels": {
"kubesphere.io/workspace": "<workspace-name>",
"kubesphere.io/managed": "true"
},
"name": "<project-name>",
"annotations": {
"kubesphere.io/creator": "<creator>"
}
},
"cluster": "<cluster-name>"
}'
Note: Before creating a project, always ask the user for:
- Project name (required)
- Workspace name (required) - which workspace to create the project in
- Cluster name (required) - which cluster to create the project in
3. Create User
Required parameters:
username: Username for the new useremail: User's email addresspassword: User's password (must meet KubeSphere password policy)
Optional parameters:
globalrole: Platform role (default:platform-regular)
# Create user via Python CLI
python ks_api.py POST /kapis/iam.kubesphere.io/v1beta1/users '{
"apiVersion": "iam.kubesphere.io/v1beta1",
"kind": "User",
"metadata": {
"annotations": {
"iam.kubesphere.io/uninitialized": "true",
"iam.kubesphere.io/globalrole": "platform-regular",
"kubesphere.io/creator": "admin"
},
"name": "<username>"
},
"spec": {
"email": "<email>",
"password": "<password>"
}
}'
Note: Before creating a user, always ask the user for:
- Username (required)
- Email address (required)
- Platform role: If not specified, default to
platform-regular
4. Invite User to Workspace/Project
For Workspace invitation:
username: Username to invite (required)workspace-name: Target workspace name (required)role: Workspace role (default:<workspace-name>-regular)
For Project invitation:
username: Username to invite (required)project-name: Target project name (required)cluster-name: Cluster name (required)role: Project role (default:viewer)
# Invite user to workspace (default role: <workspace-name>-regular)
python ks_api.py POST /kapis/iam.kubesphere.io/v1beta1/workspaces/<workspace-name>/workspacemembers '[{"username":"<username>","roleRef":"<workspace-name>-regular"}]'
# Invite user to project (default role: viewer)
python ks_api.py POST /clusters/<cluster-name>/kapis/iam.kubesphere.io/v1beta1/namespaces/<project-name>/namespacemembers '[{"username":"<username>","roleRef":"viewer"}]'
Note: Before inviting a user, always ask the user for:
- Username to invite (required)
- Target: workspace or project (required)
- Role: If not specified, default to
<workspace-name>-regularfor workspace orviewerfor project
5. Modify User Permissions
Modify user roles at three levels: platform, workspace, and project.
For Platform Role (global role):
username: Username to modify (required)globalrole: New platform role (required)- Note: Must first GET the user to get current metadata, then PUT with updated annotation
# Step 1: Get current user info (required before modification)
python ks_api.py GET /kapis/iam.kubesphere.io/v1beta1/users/<username>
# Step 2: Update global role annotation
python ks_api.py PUT /kapis/iam.kubesphere.io/v1beta1/users/<username> '{
"apiVersion": "iam.kubesphere.io/v1beta1",
"kind": "User",
"metadata": {
"name": "<username>",
"annotations": {
"iam.kubesphere.io/globalrole": "<new-global-role>"
}
}
}'
For Workspace Role:
username: Username to modify (required)workspace-name: Target workspace name (required)roleRef: New workspace role (required)
# Modify user role in workspace
python ks_api.py PUT /kapis/iam.kubesphere.io/v1beta1/workspaces/<workspace-name>/workspacemembers/<username> '{"username":"<username>","roleRef":"<workspace-name>-<role>"}'
For Project Role:
username: Username to modify (required)project-name: Target project name (required)cluster-name: Cluster name (required)roleRef: New project role (required)
# Modify user role in project
python ks_api.py PUT /clusters/<cluster-name>/kapis/iam.kubesphere.io/v1beta1/namespaces/<project-name>/namespacemembers/<username> '{"username":"<username>","roleRef":"<role>"}'
Note: Before modifying permissions, always ask the user for:
- Username to modify (required)
- Scope: platform / workspace / project (required)
- New role: Only use built-in roles provided by KubeSphere
6. Query Resources
List Workspaces
python ks_api.py GET /kapis/tenant.kubesphere.io/v1beta1/workspacetemplates
List Users
python ks_api.py GET /kapis/iam.kubesphere.io/v1beta1/users
List Workspace Members
python ks_api.py GET /kapis/iam.kubesphere.io/v1beta1/workspaces/<workspace-name>/workspacemembers
List Project Members
python ks_api.py GET /clusters/<cluster-name>/kapis/iam.kubesphere.io/v1beta1/namespaces/<project-name>/namespacemembers
List Projects in Workspace
python ks_api.py GET /clusters/<cluster-name>/kapis/tenant.kubesphere.io/v1beta1/workspaces/<workspace-name>/namespaces
Get User Details
python ks_api.py GET /kapis/iam.kubesphere.io/v1beta1/users/<username>
Error Handling
| Error Code | Cause | Solution |
|------------|-------|----------|
| 401 Unauthorized | Token expired | python ks_api.py --clear-cache && python ks_api.py --login --username admin --password <password> |
| 403 Forbidden | No permission | Use admin account |
| 409 Conflict | Resource already exists | Use different name |
| 404 Not Found | Resource not found | Verify name/workspace/cluster is correct |
| 400 Bad Request | Invalid parameters | Check error message for details (email format, password policy, naming rules) |
| Connection refused/timeout | API unreachable | Verify KUBESPHERE_HOST is correct |
Debugging:
--quietflag for cleaner output:python ks_api.py GET /users --quiet- Check token: `python ks
Truncated for display — read the full file on GitHub.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
130.2kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
