Logo: K8s Istio Troubleshooting

K8s Istio Troubleshooting

Organisatioun
k8s-servant
k8s-istio-troubleshooting

Sinn dës Skill, wann de Traffic an engem Istio-Service-Mesh op Kubernetes net funktionéiert: HTTP 403 "RBAC: access denied" vun enger AuthorizationPolicy, 503 "no healthy upstream" oder "upstream connect error or disconnect/reset before headers", 404 wéinst enger net passender Route, "Connection reset by peer" no PeerAuthentication STRICT, Sidecars, déi net injizéiert ginn, VirtualService-, DestinationRule-, Gateway- oder ServiceEntry-Reegelen, déi net applizéiert ginn, oder Problemer mat istiod a Proxyen. Liest den Access-Log an d'Response-Flags vun Envoy (UH, NR, UF, URX, filter_chain_not_found), deckt de Sidecar-Modus an den Ambient-Modus of a schléit Léisunge vir. Ënnersicht de Problem mat kubectl get, describe, events a Logs a freet, éier d'Admin-API vun Envoy an engem Proxy gelies gëtt. Liest als éischt a freet, éier eppes geännert gëtt.

Iwwersiicht

Editeurk8s-servant
Repositoryk8s-skills
Skill-Nummk8s-istio-troubleshooting
Stären
36
Forks
7
Matgeliwwert Dateien
2
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    k8s-servant huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill K8s Istio Troubleshooting an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-istio-troubleshooting
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/k8s-servant/k8s-skills.git /tmp/k8s-skills
mkdir -p .claude/skills
cp -r /tmp/k8s-skills/skills/k8s-istio-troubleshooting .claude/skills/k8s-istio-troubleshooting
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert K8s Istio Troubleshooting an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet K8s Istio Troubleshooting automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass K8s Istio Troubleshooting net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Istio troubleshooting

Find out why requests fail or behave unexpectedly in an Istio mesh, and propose a fix. Read first, ask before changing. Run the investigation commands freely. Run a command under an "Ask first" line only after the user approves that exact command; if your credentials do not allow it, give it to the user to run. Never run a "Proposed fix"; hand it to the user.

In sidecar mode every meshed pod has an Envoy container, istio-proxy, injected when its namespace has istio-injection=enabled (or an istio.io/rev label). The client's sidecar routes by VirtualServices and DestinationRules (subsets, load balancing, TLS); the server's sidecar enforces PeerAuthentication (mTLS) and AuthorizationPolicies. Each sidecar writes an access log line per request with a response flag that says what Envoy did. In ambient mode the node's ztunnel handles L4 and mTLS and an optional waypoint proxy handles L7.

The commands use placeholders: my-namespace, my-app (the server and its Service), my-web (the client) and my-pod. Replace them with the real names. The built-in view role cannot read Istio's resources (Istio adds nothing to it, and its own reader role also grants Secrets); if they are forbidden, say so and ask the user for them. Never read Secrets: not certificates, not istio-ca-secret, not gateway TLS Secrets. For that reason do not run istioctl analyze against the cluster (it reads Secrets), do not use istioctl proxy-config secret, and do not fetch Envoy's full config_dump or /certs.

When to use

  • A request inside the mesh, or through an Istio gateway, returns 403, 404, 503 or a reset, while the app itself is fine.
  • Routing rules (weights, subsets, headers) or policies do not take effect.
  • A pod has no istio-proxy container although its namespace is in the mesh.
  • istiod is down, or proxies do not get configuration.

Hand-offs, by skill name. When the evidence points elsewhere, continue with that skill; if it is not installed, keep going with the steps here and tell the user which skill would help:

  • The Service has no endpoints, or the pods are not Ready: k8s-network-troubleshooting and k8s-workload-troubleshooting.
  • A Kubernetes Gateway API route that Istio does not accept: k8s-gateway-api-troubleshooting (the objects' status) and the reference here.
  • What an Envoy response flag, reset reason or cluster statistic means in general: k8s-envoy-troubleshooting (the proxy itself; Istio writes its config).

Investigate

Work through the steps in order. Stop when you have the cause and its evidence.

1. Check the mesh membership of the client and the server: the namespace labels, and whether each pod has an istio-proxy container.

bash
kubectl get namespace my-namespace --show-labels
kubectl get pods -n my-namespace -o jsonpath='{range .items[*]}{.metadata.name}{" "}{.spec.containers[*].name}{" "}{.spec.initContainers[*].name}{"\n"}{end}'
kubectl get pods -n istio-system

2. Read the client's error and both sidecars' access logs. The response flag after the status code says what went wrong.

bash
kubectl logs -n my-namespace deployment/my-web -c istio-proxy --tail=20
kubectl logs -n my-namespace deployment/my-app -c istio-proxy --tail=20

A log line reads "GET / HTTP/1.1" 503 UH no_healthy_upstream ... outbound|80|v2|my-app...: status, response flag, details, and the Envoy cluster (direction, port, subset, host). Access logs must be on (meshConfig.accessLogFile, or a Telemetry resource); if they are empty, say so.

3. Read the Istio resources for the host and the server.

bash
kubectl get virtualservices,destinationrules,gateways,serviceentries,sidecars -A
kubectl get authorizationpolicies,peerauthentications,requestauthentications -A
kubectl get virtualservice my-app -n my-namespace -o yaml
kubectl get destinationrule my-app -n my-namespace -o yaml
kubectl get pods -n my-namespace --show-labels

4. If the cause is still open, ask the proxy itself through its admin API, with GET only, on the pod that logs the error. This runs a program in the user's pod, so ask first:

Ask first: the agent runs this only after the user approves it.

bash
kubectl exec my-pod -n my-namespace -c istio-proxy -- pilot-agent request GET clusters
kubectl exec my-pod -n my-namespace -c istio-proxy -- pilot-agent request GET stats

clusters lists each Envoy cluster with its endpoints and their health. Never send any method other than GET, and never request config_dump without a resource filter or certs.

5. Open the matching reference and follow its steps:

What you seeReference
503 UH, UF, URX, 404 NR, upstream connect error, routing that does not apply, subsets, ServiceEntries, gatewaysreferences/routing.md
403 RBAC: access denied, Connection reset by peer, filter_chain_not_found, mTLS, injection, istiod, ambientreferences/security-and-injection.md

Read the results

What the common findings mean (Istio 1.31):

  • 403 with the body RBAC: access denied, and the server's sidecar logs 403 - rbac_access_denied_matched_policy[...]: an AuthorizationPolicy denies it. [none] means an ALLOW policy selects the workload and no rule matched this request (a principal, namespace, path or method that is not listed).
  • 503 UH no_healthy_upstream on the client's sidecar, with a subset in the cluster name (outbound|80|v2|...): the route points at a DestinationRule subset whose labels match no ready pod.
  • 404 NR (no route) on the client or a gateway: no VirtualService or route matches the host, path or port.
  • upstream connect error or disconnect/reset before headers. reset reason: ... (with UF or URX): Envoy could not connect to, or keep, the upstream: the app is down, the port is wrong, or the mTLS settings of client and server disagree.
  • The client gets Connection reset by peer, and the server's sidecar logs NR filter_chain_not_found: the server requires mTLS (PeerAuthentication STRICT) and the client sent plaintext, usually because it has no sidecar.

State the cause in one sentence, then the evidence you saw (the access log line and its flag, the resource and the field), then the proposed fix.

Proposed fix

Show each fix to the user before running it: what it changes and how to undo it. Istio resources change traffic for every client of a host, and policies change who may talk to whom: never create, change or delete them yourself; hand the change to the user as a proposed fix, in the source they are deployed from. Restarting a workload so it gets a sidecar is reversible, so it goes under "Ask first". Write each undo with the values you found.

Restart a workload after its namespace was added to the mesh, so its pods get a sidecar:

Ask first: the agent runs this only after the user approves it.

bash
kubectl rollout restart deployment/my-web -n my-namespace
# Undo: kubectl rollout undo deployment/my-web -n my-namespace

Sources

Checked against the Istio 1.31 documentation and source (1.31.3):

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill K8s Istio Troubleshooting?

Sinn dës Skill, wann de Traffic an engem Istio-Service-Mesh op Kubernetes net funktionéiert: HTTP 403 "RBAC: access denied" vun enger AuthorizationPolicy, 503 "no healthy upstream" oder "upstream connect error or disconnect/reset before headers", 404 wéinst enger net passender Route, "Connection reset by peer" no PeerAuthentication STRICT, Sidecars, déi net injizéiert ginn, VirtualService-, DestinationRule-, Gateway- oder ServiceEntry-Reegelen, déi net applizéiert ginn, oder Problemer mat istiod a Proxyen. Liest den Access-Log an d'Response-Flags vun Envoy (UH, NR, UF, URX, filter_chain_not...

Firwat K8s Istio Troubleshooting op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. K8s Istio Troubleshooting besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech K8s Istio Troubleshooting an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-istio-troubleshooting an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen K8s Istio Troubleshooting benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat K8s Istio Troubleshooting benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir K8s Istio Troubleshooting domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill K8s Istio Troubleshooting gratis?

Jo. k8s-servant huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇