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

kubesphere-devops-credentials

하는 일

이 스킬은 AI 에이전트가 KubeSphere DevOps 파이프라인의 자격 증명을 설정하도록 돕습니다. 파이프라인이 Git 저장소, 클러스터, 외부 서비스에 안전하게 접근해야 하는 운영자를 위한 스킬입니다.

사용하는 경우

  • ✓SSH나 사용자 이름과 비밀번호로 DevOps 프로젝트에 비공개 Git 저장소를 추가해야 할 때.
  • ✓파이프라인이 클러스터나 서비스에 접근하려면 kubeconfig나 API 토큰이 필요한 경우.
  • ✓자격 증명을 다른 DevOps 프로젝트로 옮겨야 하거나, 자격 증명이 작동하지 않을 때.

스킬 링크

https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-credentials/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“비공개 GitHub 저장소를 SSH 키로 우리 DevOps 프로젝트에 추가해 주실 수 있나요?”

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

작동 방식

에이전트는 맞는 자격 증명 유형을 설명한 뒤, KubeSphere에 필요한 라벨과 함께 Kubernetes 시크릿으로 만듭니다. 시크릿이 Jenkins와 동기화되면 파이프라인에서 사용할 수 있습니다.

기술 내용 (원본 SKILL.md)

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

KubeSphere DevOps Credentials

Overview

Credentials in KubeSphere DevOps are Kubernetes Secrets with specific labels and annotations. They are synced to Jenkins for use in pipelines. Supported types include SSH keys, username/password, and secret tokens.

When to Use

  • Creating credentials for Git repositories
  • Setting up deployment credentials (kubeconfig, registry)
  • Managing API tokens for external services
  • Troubleshooting credential access issues
  • Migrating credentials between DevOps projects

Credential Types

Type Use Case Secret Key
SSH Git repositories username, privatekey
Basic Username/password username, password
Secret API tokens, secrets secret
Kubeconfig Kubernetes clusters kubeconfig (v1.1.x only)
SSH Username/Pass Git with user/pass username, password
String Generic text/tokens secret

Resource Structure

Credentials are stored as Kubernetes Secrets with DevOps labels:

apiVersion: v1
kind: Secret
metadata:
  name: my-credential
  namespace: project-xxx  # DevOps project namespace
  labels:
    devops.kubesphere.io/credential: "true"
  annotations:
    credential.devops.kubesphere.io/syncstatus: successful
    credential.devops.kubesphere.io/type: ssh|basic-auth|secret-text
stringData:
  username: git-user
  privatekey: |
    -----BEGIN OPENSSH PRIVATE KEY-----
    ...
    -----END OPENSSH PRIVATE KEY-----
type: credential.devops.kubesphere.io/ssh  # CRITICAL: Must use credential.devops.kubesphere.io/* type, NOT Opaque!

⚠️ CRITICAL: Secret Type Must Be credential.devops.kubesphere.io/*

The type field must be one of:

  • credential.devops.kubesphere.io/basic-auth
  • credential.devops.kubesphere.io/ssh-auth
  • credential.devops.kubesphere.io/secret-text
  • credential.devops.kubesphere.io/kubeconfig

Using type: Opaque will result in:

  • Credential sync status stuck at "pending"
  • Jenkins cannot find the credential
  • Pipeline builds fail with "CredentialId could not be found"

Controller Logic: The credential controller only watches secrets with types starting with credential.devops.kubesphere.io/ (see devopscredential_controller.go line 102). Secrets with type: Opaque are completely ignored.

API Endpoints

Operation Method Endpoint
List Credentials GET /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials
Create Credential POST /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials
Get Credential GET /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials/{credential}
Update Credential PUT /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials/{credential}
Delete Credential DELETE /kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials/{credential}
Get Usage GET /kapis/devops.kubesphere.io/v1alpha2/namespaces/{devops}/credentials/{credential}/usage

Common Operations

List Credentials

curl "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials" \
  -H "Authorization: Bearer $TOKEN"

Create SSH Credential

curl -X POST "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "apiVersion": "v1",
    "kind": "Secret",
    "metadata": {
      "name": "github-ssh-key",
      "annotations": {
        "credential.devops.kubesphere.io/type": "ssh"
      }
    },
    "stringData": {
      "username": "git",
      "privatekey": "-----BEGIN OPENSSH PRIVATE KEY-----\n...\n-----END OPENSSH PRIVATE KEY-----"
    },
    "type": "credential.devops.kubesphere.io/ssh-auth"
  }'

Create Basic Auth Credential

curl -X POST "https://kubesphere-api/kapis/devops.kubesphere.io/v1alpha3/namespaces/{devops}/credentials" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "apiVersion": "v1",
    "kind": "Secret",
    "metadata": {
      "name": "docker-registry",
      "annotations": {
        "credential.devops.kubesphere.io/type": "basic-auth"
      }
    },
    "stringData": {
      "username": "docker-user",
      "password": "docker-password"
    },
    "type": "credential.devops.kubesphere.io/basic-auth"
  }'

자주 묻는 질문

어떤 자격 증명 유형을 지원하나요?

SSH, 사용자 이름과 비밀번호, 시크릿 토큰, kubeconfig, 일반 텍스트를 나열합니다.

자격 증명은 어디에 저장되나요?

DevOps 라벨이 붙은 Kubernetes 시크릿으로 저장되며, Jenkins에 동기화됩니다.

에이전트가 자격 증명이 실패하는 이유를 확인할 수 있나요?

네. 접근 문제와 동기화 상태를 해결하는 방법을 다룹니다.

상세 정보

작성자의 원본 설명

Use when managing credentials in KubeSphere DevOps, including repository credentials, kubeconfig, and API tokens

repo: kubesphere/kubesphere

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬