kubesphere-servicemesh
O que ela faz
Esta skill ajuda um agente de IA a trabalhar com a extensão ServiceMesh, que combina Istio, Kiali e Jaeger no KubeSphere. É para operadores e desenvolvedores que querem controle de tráfego, lançamentos canary e mapas de serviço para microsserviços.
Quando usar
- ✓Quando você quer instalar ou atualizar a extensão ServiceMesh no KubeSphere.
- ✓Quando você precisa de um lançamento canary ou blue-green para um serviço que faz parte de uma aplicação.
- ✓Quando a injeção de sidecar, as métricas de tráfego ou o rastreamento não estão funcionando para um serviço.
Link da skill
https://github.com/kubesphere/kubesphere/blob/master/skills/kubesphere-servicemesh/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Você pode executar um lançamento canary para nosso serviço de checkout na aplicação shop e verificar a divisão do tráfego?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente verifica se a malha está instalada e quais versões estão disponíveis. Depois configura a estratégia de lançamento ou a política de tráfego do serviço e verifica os sidecars, a topologia e as métricas.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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
questionwithmultiple: true:- All clusters →
TARGET_CLUSTERS="$READY_CLUSTERS" - Host cluster only →
TARGET_CLUSTERS="$HOST_CLUSTER" - (custom) — validate each name against
$READY_CLUSTERS
- All 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.
Perguntas frequentes
Como um serviço entra na malha?
A skill diz que um serviço é gerenciado quando tem a anotação da malha e pertence a uma aplicação composta.
Quais ferramentas a malha inclui?
Inclui o Istio para roteamento, o Kiali para topologia e o Jaeger para rastreamento.
Posso atualizar uma instalação existente?
Sim. Se o ServiceMesh estiver instalado, você pode selecionar uma versão mais nova para atualizar.
Detalhes
Descrição original do autor
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
Popularidade
- Estrelas no GitHub
- 17 mil
- Posição no ranking
- #10780
- Licença
- —
- Atualizada em
- 14/07/2026
Comentários
- …
Mais skills deste repositório
frontend-forge-fe-operations
17 milAjuda seu agente a gerenciar recursos FrontendExtension no KubeSphere, incluindo criar, publicar e depurar esses recursos.
frontend-forge-fi-operations
17 milAjuda seu agente a criar, atualizar, ativar, desativar e inspecionar recursos FrontendIntegration e a extensão frontend-forge no KubeSphere.
frontend-integration-yaml
17 milAjuda seu agente a criar um YAML de FrontendIntegration pronto para envio, com um menu e uma ou mais páginas.
kubeeye
17 milAjuda seu agente a instalar o KubeEye e configurar regras e planos de inspeção do cluster, depois ler os relatórios de inspeção.
Skills parecidas
openclaw-update
394 milAjuda seu agente a atualizar um OpenClaw Gateway existente, escolhendo o método que combina com a instalação e mantendo sua sessão funcionando.
diagnose-gateway
394 milAjuda seu agente a descobrir por que seu OpenClaw Gateway está falhando, verificando configurações, canais e portas sem alterar nada.
crabbox-apps
394 milAjuda seu agente a abrir e executar um app em uma máquina temporária na nuvem e depois mostrar a visualização dele no painel lateral do seu chat.