Skillpedia
النشر والسحابة (DevOps)17k · #10768

kubesphere-devops-credentials

ما الذي تفعله

تساعد هذه المهارة وكيلك على إعداد بيانات الاعتماد لخطوط أنابيب KubeSphere DevOps. وهي موجهة إلى المشغلين الذين يحتاجون إلى أن تصل خطوط الأنابيب إلى مستودعات Git أو المجموعات أو الخدمات الخارجية بأمان.

متى تستخدمها

  • ✓عندما تحتاج إلى إضافة مستودع Git إلى مشروع DevOps عبر SSH أو اسم مستخدم وكلمة مرور.
  • ✓عندما يحتاج خط أنابيب إلى kubeconfig أو رمز API للوصول إلى مجموعة أو خدمة.
  • ✓عندما يجب نقل بيانات الاعتماد إلى مشروع DevOps آخر، أو عندما تكون بيانات الاعتماد غير فعالة.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-devops-credentials/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“هل يمكنك إضافة مستودع GitHub الخاص بنا إلى مشروع DevOps باستخدام مفتاح SSH؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يشرح وكيلك نوع بيانات الاعتماد المناسب، ثم ينشئها كسر Kubernetes مع الوسوم التي تحتاجها KubeSphere. وبعد مزامنتها مع 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 والنص العام.

أين تُخزَّن بيانات الاعتماد؟

تُخزَّن كأسرار Kubernetes بوسوم DevOps، وتتم مزامنتها مع Jenkins.

هل يستطيع وكيلي معرفة سبب فشل بيانات الاعتماد؟

نعم. تغطي المهارة استكشاف مشكلات الوصول وحالة المزامنة.

التفاصيل

الوصف الأصلي من المؤلف

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

repo: kubesphere/kubesphere

الشعبية

نجوم GitHub
17k
الترتيب
#10768
الترخيص
—
آخر تحديث
14‏/7‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة