kubesphere-devops-tenant
What it does
This skill helps an AI agent run DevOps tasks for a namespace-level user who does not have cluster admin rights. It is for project admins and operators who need pipeline work without full cluster access.
When to use it
- βWhen you are a project admin in KubeSphere and do not have cluster admin rights.
- βWhen you need to list the DevOps projects you can access and trigger a pipeline through the KubeSphere API.
- βWhen you are building a small tool for team members who only have access to their own namespace.
Skill link
https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-tenant/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI only have project-level access. Can you list the DevOps projects I can use and start our staging pipeline?β
5 new skills a week. 1 minute to read.
How it works
The agent uses the KubeSphere API routes that work for namespace users. It lists the namespaces you can reach as DevOps projects and then runs pipeline actions through the same API.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
KubeSphere DevOps Tenant Operations
Overview
This guide covers DevOps operations for namespace-scoped tenants who:
- Have admin/operator permissions within their DevOpsProject namespace(s)
- Cannot access
kubesphere-devops-system(Jenkins secrets, tokens) - Cannot call Jenkins APIs directly
- Must use KubeSphere APIs (
/kapis/devops.kubesphere.io/) for all operations - Use KubeSphere authentication (OAuth tokens), not Jenkins tokens
Critical Distinction: DevOps projects are namespaces, not DevOpsProject CRs. To list accessible DevOps projects:
# Correct - lists namespaces (DevOps projects) tenant can access
GET /clusters/{cluster}/kapis/devops.kubesphere.io/v1alpha3/workspaces/{workspace}/namespaces
# Wrong - requires cluster-admin, returns 403 for tenants
GET /clusters/{cluster}/apis/devops.kubesphere.io/v1alpha3/devopsprojects
When to Use
- Operating as a project admin/operator (not cluster admin)
- Working within tenant namespace boundaries
- No access to Jenkins secrets in
kubesphere-devops-system - Need to trigger pipelines via KubeSphere API
- Building automation for namespace-scoped users
- Developing tenant-facing tooling
Tenant vs Admin Permissions
| Capability | Tenant (Namespace) | Admin (Cluster) |
|---|---|---|
| Access DevOpsProject | β Own namespace(s) | β All namespaces |
| Create/Edit Pipelines | β In own namespace | β Any namespace |
| View PipelineRuns | β In own namespace | β Any namespace |
| Access Jenkins Secret | β No | β
kubesphere-devops-system |
| Direct Jenkins API | β No | β Full access |
| View Jenkins Console | β No | β Via NodePort |
| KubeSphere API | β
/kapis/ |
β
/kapis/ |
Authentication
Tenants authenticate via KubeSphere's OAuth, not Jenkins. See kubesphere-core for complete OAuth authentication details.
Quick Reference
# Exchange credentials for OAuth token (see core skill for details)
export KUBESPHERE_API="https://kubesphere-api.example.com"
export USERNAME="tenant-user"
export PASSWORD="tenant-password"
# Get token
export API_TOKEN=$(curl -s -X POST "${KUBESPHERE_API}/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=password&username=${USERNAME}&password=${PASSWORD}&client_id=kubesphere&client_secret=kubesphere" \
| jq -r '.access_token')
# Use token
curl -s "${KUBESPHERE_API}/kapis/devops.kubesphere.io/v1alpha3/namespaces/demo-project/pipelines" \
-H "Authorization: Bearer ${API_TOKEN}"
Key Points:
- OAuth token expires in 7200 seconds (2 hours)
- Use
client_id=kubesphereandclient_secret=kubesphere - Token contains user's RBAC permissions
See kubesphere-core for complete OAuth authentication details including token refresh and common use cases.
Get KubeSphere API Token
Tenants authenticate via KubeSphere's OAuth, not Jenkins:
# Method 1: Using kubeconfig (if configured)
kubectl config view --raw -o jsonpath='{.users[?(@.name=="current-user")].user.token}'
# Method 2: Via KubeSphere OAuth API (Recommended)
export KUBESPHERE_URL="https://kubesphere-api.example.com"
export USERNAME="tenant-user"
export PASSWORD="tenant-password"
# Exchange credentials for token
TOKEN_RESPONSE=$(curl -s -X POST "${KUBESPHERE_URL}/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=password" \
--data-urlencode "username=${USERNAME}" \
--data-urlencode "password=${PASSWORD}" \
--data-urlencode "client_id=kubesphere" \
--data-urlencode "client_secret=kubesphere")
# Extract access token
ACCESS_TOKEN=$(echo "$TOKEN_RESPONSE" | jq -r '.access_token')
# Token expires in 7200 seconds (2 hours)
echo "Token obtained: ${ACCESS_TOKEN:0:50}..."
Using Token with API
export API_TOKEN="<your-kubesphere-token>"
export DEVOPS_PROJECT="demo-project"
export KUBESPHERE_API="https://kubesphere-api.example.com"
# Verify access
curl -s "${KUBESPHERE_API}/kapis/devops.kubesphere.io/v1alpha2/namespaces/${DEVOPS_PROJECT}/pipelines" \
-H "Authorization: Bearer ${API_TOKEN}"
Complete Working Example
Here's a verified workflow using tenant credentials (stoneshi / P@88w0rd):
Step 1: Authenticate
export KUBESPHERE_API="http://kubesphere-apiserver.kubesphere-system.svc:80"
export USERNAME="stoneshi"
export PASSWORD='P@88w0rd'
# Get
FAQ
Can the agent see Jenkins secrets with this skill?
No. The skill says namespace users cannot access the Jenkins secrets in the DevOps system namespace.
How does it list my DevOps projects?
It lists the namespaces you have access to in your workspace, since DevOps projects are namespaces.
Can a tenant call Jenkins directly?
No. The skill says tenants must use KubeSphere APIs instead of calling Jenkins.
Details
Original description by the author
Use when operating KubeSphere DevOps as a namespace-scoped tenant with limited permissions, without cluster-admin access, or when accessing DevOps through KubeSphere APIs only
repo: kubesphere/kubesphere
Popularity
- GitHub stars
- 17k
- Ranking position
- #10772
- License
- β
- Updated
- 7/14/2026
Comments
- β¦
More skills from this repository
frontend-forge-fe-operations
17kHelps your agent manage FrontendExtension resources in KubeSphere, including building, publishing and debugging them.
frontend-forge-fi-operations
17kHelps your agent create, update, enable, disable and inspect FrontendIntegration resources and the frontend-forge extension in KubeSphere.
frontend-integration-yaml
17kHelps your agent create ready-to-submit FrontendIntegration YAML for a single menu with one or more pages.
kubeeye
17kHelps your agent install KubeEye and set up cluster inspection rules and plans, then read the inspection reports.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.