agentleFS
abevzabevz/devops-skills/skills/istio-debug/SKILL.md

istio-debug

Skill0 starsChanged 41 days agoMITView on GitHub

Use when debugging Istio service mesh issues such as sidecar injection failures, mTLS errors, 503s, or VirtualService routing problems. Mention "istio", "envoy sidecar", "mtls error", "virtualservice not routing" as triggers.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read istioctl proxy-status, pod injection state, route config, and relevant logs.

    line 18
  2. Distinctive:

    Do not alter a VirtualService until the proxy received the expected config.

    line 22
  3. Distinctive:

    Follow the Workflow, Safety rules, and Quality checklist below.

    line 26
  4. Distinctive:

    Use when traffic in an Istio mesh misbehaves — 503s between services, mTLS handshake failures, VirtualService routes not taking effect, …

    line 36
  5. Very specific:

    Read-only first, always: istioctl analyze/proxy-status/proxy-config/x describe, kubectl get/describe/logs.

    line 92
  6. Distinctive:

    Do not apply, edit, or delete Istio resources (VirtualService, DestinationRule, PeerAuthentication, Gateway) on a live cluster — propose …

    line 94
  7. Distinctive:

    Never suggest disabling mTLS mesh-wide as a diagnostic shortcut — narrow to the affected workload pair with evidence instead.

    line 97
  8. Distinctive:

    Do not restart istiod or inject/eject sidecars without explicit confirmation.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Istio Debug

TL;DR checklist

  • Run istioctl analyze for configuration errors.
  • Check injection and proxy sync before tracing traffic rules.
  • Classify mTLS, routing, and upstream failures from exact proxy evidence.

Key read-only checks

  • Read istioctl proxy-status, pod injection state, route config, and relevant logs.

Common pitfalls

  • Do not alter a VirtualService until the proxy received the expected config.

Agent procedure

Follow the Workflow, Safety rules, and Quality checklist below.

Quick references

  • references/playbooks.md

Last verified: unverified

When to use

Use when traffic in an Istio mesh misbehaves — 503s between services, mTLS handshake failures, VirtualService routes not taking effect, sidecars missing or unready — and the cause needs to be found. Also covers reviewing Istio config (VirtualService/DestinationRule/Gateway) before apply.

Goal

Locate the failing hop (app → local sidecar → remote sidecar → app) and the config that breaks it, backed by istioctl/Envoy evidence, and propose a fix — without mutating live mesh config.

Workflow

  1. Run the analyzer first — istioctl analyze -n <ns> catches a large share of config mistakes outright (missing DestinationRule subsets, gateway/host mismatches, deprecated fields). Cheap, read-only, always first.
  2. Sidecar presence — is the sidecar actually there? kubectl get pod -o jsonpath for container count, namespace label istio-injection=enabled (or revision label), pod-level sidecar.istio.io/inject overrides. Pods created before injection was enabled never get one — check pod age vs. label age.
  3. Control-plane sync — istioctl proxy-status: every proxy should be SYNCED. A proxy stuck STALE/NOT SENT means the config you're staring at never reached Envoy — debug istiod connectivity/version skew before debugging routing rules.
  4. mTLS mismatch — for connection resets / upstream connect error ... TLS error:
    • PeerAuthentication (namespace and mesh-wide) vs. DestinationRule.trafficPolicy.tls — the classic break is STRICT PeerAuthentication with a DestinationRule forcing DISABLE, or a mesh-external service addressed as if it were in the mesh
    • istioctl x describe pod <pod> summarizes effective mTLS per port
    • plaintext legacy clients hitting a STRICT namespace show as raw TCP resets on port 15006
  5. Routing rules — for "VirtualService ignored":
    • host must match how the client actually calls it (short name resolves within the namespace; FQDN elsewhere)
    • subset routes require a DestinationRule defining that subset, and pods must carry the subset's labels — istioctl analyze flags missing ones, istioctl proxy-config routes <pod> shows what Envoy actually has
    • rule ordering: first match wins; a catch-all route above a specific one shadows it
  6. 503 taxonomy — read the Envoy response flags in sidecar access logs (kubectl logs <pod> -c istio-proxy): UH = no healthy upstream (endpoints empty/unready), UF = upstream connect failure (mTLS or the app not listening), NR = no route (routing config), UO/URX = circuit breaker / retry budget exhausted (check DestinationRule outlierDetection/connectionPool — overly tight settings self-inflict 503s under load).
  7. Gateway path — for ingress issues: Gateway hosts/port/TLS config vs. VirtualService hosts + gateways binding, and whether the gateway pod's Envoy actually got a listener (istioctl proxy-config listeners <gw-pod> -n istio-system).
  8. Correlate and conclude — name the failing hop and the exact config object; propose the minimal change and the command that verifies it.

References

references/playbooks.md — Envoy response-flag → cause table, the mTLS mismatch matrix, sidecar-injection failure tree, gateway path checks, and the reading order for intermittent 503s. Route there as soon as you have a response flag or istioctl output.

For installing/operating the mesh itself (install, revision/canary upgrades, sidecar vs ambient, traffic management, mTLS/authz design, telemetry) use the istio skill.

Safety rules

  • Read-only first, always: istioctl analyze/proxy-status/proxy-config/x describe, kubectl get/describe/logs. None of these mutate state.
  • Do not apply, edit, or delete Istio resources (VirtualService, DestinationRule, PeerAuthentication, Gateway) on a live cluster — propose the manifest; the user applies it. A bad mTLS or routing change can cut off every consumer of a service at once.
  • Never suggest disabling mTLS mesh-wide as a diagnostic shortcut — narrow to the affected workload pair with evidence instead.
  • Do not restart istiod or inject/eject sidecars without explicit confirmation.

Output format

## Observations
<analyzer output, proxy-status, sidecar presence>

## Evidence
<envoy response flags / istioctl output, quoted>

## Failing hop
<app → local sidecar → remote sidecar → app: which link, and why>

## Root cause
## Fix
<config diff, marked as requiring user confirmation to apply>

## Verification

Quality checklist

  • istioctl analyze was run (or its unavailability noted) before manual digging
  • Proxy sync status was checked before debugging routing config
  • 503s were classified by Envoy response flags, not guessed at
  • mTLS was checked from both sides (PeerAuthentication and DestinationRule)
  • Only read-only commands were run; no mesh config was applied

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.