Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)17k Β· #10780

kubesphere-servicemesh

Fungsinya

Skill ini membantu agent AI bekerja dengan ekstensi ServiceMesh, yang menggabungkan Istio, Kiali, dan Jaeger di KubeSphere. Skill ini untuk operator dan pengembang yang menginginkan kontrol lalu lintas, rilis canary, dan peta layanan untuk microservice.

Kapan dipakai

  • βœ“Saat Anda ingin memasang atau memutakhirkan ekstensi ServiceMesh di KubeSphere.
  • βœ“Saat Anda memerlukan rilis canary atau blue-green untuk layanan yang merupakan bagian dari sebuah aplikasi.
  • βœ“Saat injeksi sidecar, metrik lalu lintas, atau pelacakan tidak berfungsi untuk sebuah layanan.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-servicemesh/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda menjalankan rilis canary untuk layanan checkout kami di aplikasi toko dan memeriksa pembagian lalu lintasnya?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent memeriksa apakah mesh sudah terpasang dan versi apa yang tersedia. Kemudian agent menyiapkan strategi rilis atau kebijakan lalu lintas untuk layanan, lalu memeriksa sidecar, topologi, dan metriknya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

KubeSphere ServiceMesh

Overview

Integrates Istio, Kiali, and Jaeger to provide traffic governance for microservices. They operate on Composed App (backed by applications.app.k8s.io). A Service is governed when it has the annotation servicemesh.kubesphere.io/enabled: "true" and belongs to a Composed App.

Defines two core CRDs:

  • Strategy β€” grayscale release task (canary, blue-green, traffic mirroring)
  • ServicePolicy β€” traffic management (load balancing, connection pools, circuit breaking, etc.) via Istio DestinationRule

Istio handles traffic routing, Kiali provides topology visualization, and Jaeger enables tracing.

Before You Start

Check if ServiceMesh is already installed:

kubectl get installplans.kubesphere.io servicemesh --ignore-not-found

If found, upgrading is supported β€” just select a newer version in Step 1.

Installation

Step 1: Detect and Select Version

ALL_VERSIONS=$(kubectl get extensionversions.kubesphere.io \
  -l kubesphere.io/extension-ref=servicemesh \
  -o jsonpath='{range .items[*]}{.spec.version}{"\n"}{end}' | sort -V)

LATEST_STABLE=$(echo "$ALL_VERSIONS" | grep -v -E 'alpha|beta|rc' | tail -1)
if [ -z "$LATEST_STABLE" ]; then
  LATEST_STABLE=$(echo "$ALL_VERSIONS" | tail -1)
fi

echo "Available versions:"
echo "$ALL_VERSIONS"
echo ""
echo "Latest stable: $LATEST_STABLE"

This sets ALL_VERSIONS and LATEST_STABLE. Use SELECTED_VERSION for the version chosen.

Use the question tool:

  • $LATEST_STABLE (Recommended) β€” accept the auto-detected version
  • (custom) β€” type a specific version; validate it against the printed list

Step 2: Detect and Select Clusters

CLUSTER_DATA=$(kubectl get clusters.cluster.kubesphere.io \
  -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.conditions[?(@.type=="Ready")].status}{"\n"}{end}')

READY_CLUSTERS=$(echo "$CLUSTER_DATA" | awk -F'\t' '$2 == "True" {print $1}')
CLUSTER_COUNT=$(echo "$READY_CLUSTERS" | wc -l)

HOST_CLUSTER=$(kubectl get clusters.cluster.kubesphere.io \
  -l 'cluster-role.kubesphere.io/host' \
  -o jsonpath='{.items[0].metadata.name}' || echo "")

echo "Ready clusters:"
echo "$READY_CLUSTERS"
echo ""
echo "Cluster count: $CLUSTER_COUNT"
echo "Host cluster: $HOST_CLUSTER"

This sets READY_CLUSTERS, CLUSTER_COUNT, HOST_CLUSTER.

  • 1 cluster β†’ skip selection, auto-use it. Set TARGET_CLUSTERS="$HOST_CLUSTER"
  • Multiple clusters β†’ use question with multiple: true:
    • All clusters β†’ TARGET_CLUSTERS="$READY_CLUSTERS"
    • Host cluster only β†’ TARGET_CLUSTERS="$HOST_CLUSTER"
    • (custom) β€” validate each name against $READY_CLUSTERS

Step 3: Check gateway-api Compatibility

if kubectl get installplans.kubesphere.io gateway-api --ignore-not-found &>/dev/null; then
  GW_API_EXISTS=true
  echo "gateway-api InstallPlan exists β†’ will set PILOT_ENABLE_GATEWAY_API=false"
else
  GW_API_EXISTS=false
  echo "gateway-api not found β†’ no compatibility config needed"
fi

echo "GW_API_EXISTS=$GW_API_EXISTS"

If GW_API_EXISTS=true, the InstallPlan config will include PILOT_ENABLE_GATEWAY_API: "false" to avoid conflicts.

Step 4: Generate and Apply InstallPlan

./scripts/generate-installplan.sh "$SELECTED_VERSION" "$TARGET_CLUSTERS" "$GW_API_EXISTS"

This generates the YAML to /tmp/servicemesh-installplan.yaml, runs --dry-run=server, then prints the apply command.

For configurable extension values (tracing sampling rate, storage backend, credentials, etc.), see references/extension-values.md.

Apply it:

kubectl apply -f /tmp/servicemesh-installplan.yaml

Tell the user "Installing". Then ask if they want to check status. If yes:

./scripts/check-status.sh poll

Status Checking

Purpose Command
Single snapshot ./scripts/check-status.sh quick
Wait until complete (5min timeout) ./scripts/check-status.sh poll

Logic:

  • All Installed β†’ βœ“ success
  • Any Failed β†’ βœ— prints full status
  • Timeout (300s) β†’ ⚠ prints current status
  • In progress β†’ prints every 10s

Uninstallation

⚠ Always confirm with the user before proceeding.

Uninstall from all clusters

if ! kubectl get installplans.kubesphere.io servicemesh --ignore-not-found &>/dev/null; then
  echo "ServiceMesh is not installed."
  exit 0
fi

Confirm with the user, then delete:

kubectl delete installplans.
Pertanyaan umum

Bagaimana sebuah layanan bergabung ke mesh?

Skill ini menyatakan layanan diatur mesh saat memiliki anotasi mesh dan termasuk dalam aplikasi yang tersusun.

Alat apa saja yang ada di dalam mesh?

Mesh mencakup Istio untuk perutean, Kiali untuk topologi, dan Jaeger untuk pelacakan.

Bisakah saya memutakhirkan pemasangan yang sudah ada?

Bisa. Jika ServiceMesh sudah terpasang, Anda dapat memilih versi yang lebih baru untuk diperbarui.

Detail

Deskripsi asli dari pembuat

KubeSphere ServiceMesh extension management Skill (Istio + Kiali + Jaeger). Use this skill for the ServiceMesh extension Configuration (covers installation, uninstallation, status checks), troubleshooting (covers grayscale release, sidecar injection, topology/metrics, and tracing for Composed Apps Aka Custom Applications).

repo: kubesphere/kubesphere

Popularitas

Bintang GitHub
17k
Peringkat
#10780
Lisensi
β€”
Diperbarui
14/7/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa