# Kubesphere Servicemesh

KubeSphere ServiceMesh extension management Skill (Istio + Kiali + Jaeger).

- Repository: https://github.com/kubesphere/kubesphere (17074 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-07-15
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add kubesphere/kubesphere --skill kubesphere-servicemesh -g -a claude-code -y`
Codex: `npx skills add kubesphere/kubesphere --skill kubesphere-servicemesh -g -a codex -y`
Cursor: `npx skills add kubesphere/kubesphere --skill kubesphere-servicemesh -g -a cursor -y`
Gemini CLI: `npx skills add kubesphere/kubesphere --skill kubesphere-servicemesh -g -a gemini-cli -y`

## Description

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).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

```bash
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

```bash
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

```bash
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)

The rest: https://github.com/kubesphere/kubesphere/blob/HEAD/skills/kubesphere-servicemesh/SKILL.md
