मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)17k · #10768

kubesphere-devops-credentials

यह क्या करती है

यह स्किल AI एजेंट को KubeSphere DevOps pipelines के लिए credentials सेट करने में मदद करती है। यह उन ऑपरेटरों के लिए है जिन्हें pipelines को Git repositories, क्लस्टरों या बाहरी सेवाओं तक सुरक्षित रूप से पहुँचाना है।

कब इस्तेमाल करें

  • ✓जब आपको किसी DevOps project में SSH या username और password से Git repository जोड़नी हो।
  • ✓जब कोई pipeline किसी क्लस्टर या सेवा तक पहुँचने के लिए kubeconfig या API token चाहती हो।
  • ✓जब credentials किसी दूसरे DevOps project में ले जाने हों, या कोई credential काम न कर रहा हो।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-credentials/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप हमारी निजी GitHub repository को SSH key से हमारे DevOps project में जोड़ सकते हैं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट बताता है कि कौन-सा credential प्रकार उपयुक्त है, फिर उसे KubeSphere की ज़रूरी labels के साथ Kubernetes secret के रूप में बनाता है। sync होकर Jenkins तक पहुँचने के बाद pipelines उसे इस्तेमाल कर सकती हैं।

तकनीकी सामग्री (मूल 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"
  }'

अक्सर पूछे जाने वाले सवाल

कौन-से credential प्रकार समर्थित हैं?

स्किल SSH, username और password, secret tokens, kubeconfig और सामान्य टेक्स्ट सूचीबद्ध करती है।

credentials कहाँ रखे जाते हैं?

वे DevOps labels वाले Kubernetes secrets के रूप में रखे जाते हैं और Jenkins से sync होते हैं।

क्या एजेंट जाँच सकता है कि credential क्यों फ़ेल होता है?

हाँ। स्किल पहुँच की समस्याओं और sync स्थिति के समस्या-निवारण को कवर करती है।

जानकारी

लेखक का मूल विवरण

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

repo: kubesphere/kubesphere

लोकप्रियता

GitHub स्टार
17k
रैंकिंग में स्थान
#10768
लाइसेंस
—
अपडेट की गई
14/7/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills