kubesphere-devops-tenant
하는 일
이 스킬은 AI 에이전트가 클러스터 관리자 권한이 없는 네임스페이스 수준 사용자를 위해 DevOps 작업을 수행하도록 돕습니다. 전체 클러스터 접근 없이 파이프라인 작업이 필요한 프로젝트 관리자와 운영자를 위한 스킬입니다.
사용하는 경우
- ✓KubeSphere에서 프로젝트 관리자이지만 클러스터 관리자 권한이 없을 때.
- ✓접근 가능한 DevOps 프로젝트를 나열하고 KubeSphere API로 파이프라인을 실행해야 할 때.
- ✓자기 네임스페이스에만 접근하는 팀원을 위한 작은 도구를 만드는 경우.
스킬 링크
https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-tenant/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“저는 프로젝트 수준의 접근 권한만 있습니다. 제가 쓸 수 있는 DevOps 프로젝트를 나열하고 스테이징 파이프라인을 시작해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 네임스페이스 사용자에게 맞는 KubeSphere API 경로를 사용합니다. DevOps 프로젝트가 네임스페이스이므로, 접근 가능한 네임스페이스를 나열하고 같은 API로 파이프라인 작업을 실행합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
이 스킬로 Jenkins 비밀 정보를 볼 수 있나요?
아니요. 스킬에 따르면 네임스페이스 사용자는 DevOps 시스템 네임스페이스의 Jenkins 시크릿에 접근할 수 없습니다.
내 DevOps 프로젝트는 어떻게 나열하나요?
작업 공간에서 접근할 수 있는 네임스페이스를 나열합니다. DevOps 프로젝트가 네임스페이스이기 때문입니다.
테넌트가 Jenkins를 직접 호출할 수 있나요?
아니요. 스킬에 따르면 테넌트는 Jenkins를 직접 부르지 않고 KubeSphere API를 사용해야 합니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 17k
- 순위
- #10772
- 라이선스
- —
- 업데이트
- 2026. 7. 14.
댓글
- …
이 저장소의 다른 스킬
frontend-forge-fe-operations
17k에이전트가 KubeSphere에서 FrontendExtension 리소스를 관리하도록 돕습니다. 빌드, 게시, 문제 해결까지 포함됩니다.
frontend-forge-fi-operations
17k에이전트가 KubeSphere의 FrontendIntegration 리소스와 frontend-forge 확장 기능을 만들고 관리하도록 돕습니다.
frontend-integration-yaml
17k에이전트가 메뉴 하나와 하나 이상의 페이지로 구성된, 바로 제출할 수 있는 FrontendIntegration YAML을 만들도록 돕습니다.
kubeeye
17k에이전트가 KubeEye를 설치하고, 클러스터 점검 규칙과 계획을 설정한 뒤 점검 보고서를 읽도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.