kubesphere-multi-tenant-management
ما الذي تفعله
تساعد هذه المهارة وكيلك على إعداد المستأجرين في KubeSphere، بما في ذلك المستخدمون ومساحات العمل والمشاريع وربط الأدوار. وهي موجهة إلى المسؤولين الذين يديرون من يصل إلى ماذا في مجموعة مشتركة.
متى تستخدمها
- ✓عندما تحتاج إلى إضافة مستخدم جديد إلى KubeSphere بالدور الأساسي.
- ✓عندما يحتاج فريق جديد إلى مساحة عمل أو مشروع بالأعضاء المناسبين.
- ✓عندما تريد منح شخص وصولاً إلى مشروع بأدنى مستوى يحتاجه.
رابط المهارة
https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-multi-tenant-management/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“من فضلك أضف مستخدماً جديداً باسم Maria بصلاحية عادية، ودعها إلى مساحة عمل التسويق كعضو عادي.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
ينشئ وكيلك المستخدم أو مساحة العمل أو المشروع أو يقرأه، ثم يربط الدور المدمج المطابق. يبدأ بأقل مستوى وصول، ولا يرفعه إلا عندما تطلب ذلك.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
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>",
"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
- الترخيص
- —
- آخر تحديث
- 14/7/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
frontend-forge-fe-operations
17kيساعد وكيلك على إدارة موارد FrontendExtension في KubeSphere، بما في ذلك بنائها ونشرها وتصحيح أخطائها.
frontend-forge-fi-operations
17kيساعد وكيلك على إنشاء موارد FrontendIntegration وتحديثها وتفعيلها وتعطيلها وفحصها، وكذلك امتداد frontend-forge في KubeSphere.
frontend-integration-yaml
17kيساعد وكيلك على إنشاء ملف YAML جاهز للإرسال لـ FrontendIntegration لقائمة واحدة تحتوي على صفحة أو أكثر.
kubeeye
17kيساعد وكيلك على تثبيت KubeEye وإعداد قواعد فحص المجموعة وخطط الفحص، ثم قراءة تقارير الفحص.
مهارات مشابهة
openclaw-update
394kيساعد وكيلك على تحديث بوابة OpenClaw Gateway الموجودة، مع اختيار طريقة التحديث المناسبة لطريقة تثبيتها والحفاظ على جلستك.
diagnose-gateway
394kيساعد وكيلك على معرفة سبب فشل بوابة OpenClaw Gateway عبر فحص الإعدادات والقنوات والمنافذ دون تغيير أي شيء.
crabbox-apps
394kيساعد وكيلك على فتح تطبيق وتشغيله على جهاز سحابي مؤقت، ثم عرض واجهته في الشريط الجانبي للدردشة.