Logo di K8s Istio Troubleshooting

K8s Istio Troubleshooting

Organizzazione
k8s-servant
k8s-istio-troubleshooting

Usa questa skill quando il traffico non funziona in una service mesh Istio su Kubernetes: errore HTTP 403 "RBAC: access denied" causato da un'AuthorizationPolicy, errore 503 "no healthy upstream" o "upstream connect error or disconnect/reset before headers", errore 404 dovuto a una route non corrispondente, "Connection reset by peer" dopo PeerAuthentication STRICT, sidecar non inseriti, regole VirtualService, DestinationRule, Gateway o ServiceEntry non applicate oppure problemi con istiod e i proxy. Legge i log di accesso di Envoy e i flag di risposta (UH, NR, UF, URX, filter_chain_not_found), include le modalità sidecar e ambient e propone delle soluzioni. Esegue le verifiche con kubectl get, describe, events e logs e chiede prima di leggere l'API di amministrazione di Envoy all'interno di un proxy. Prima analizza e poi chiede prima di apportare modifiche.

Panoramica

Pubblicato dak8s-servant
Repositoryk8s-skills
Nome della skillk8s-istio-troubleshooting
Stelle
36
Fork
7
File inclusi
2
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 2

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da k8s-servant su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA K8s Istio Troubleshooting in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-istio-troubleshooting
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva K8s Istio Troubleshooting in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente K8s Istio Troubleshooting non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi K8s Istio Troubleshooting non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA K8s Istio Troubleshooting?

Usa questa skill quando il traffico non funziona in una service mesh Istio su Kubernetes: errore HTTP 403 "RBAC: access denied" causato da un'AuthorizationPolicy, errore 503 "no healthy upstream" o "upstream connect error or disconnect/reset before headers", errore 404 dovuto a una route non corrispondente, "Connection reset by peer" dopo PeerAuthentication STRICT, sidecar non inseriti, regole VirtualService, DestinationRule, Gateway o ServiceEntry non applicate oppure problemi con istiod e i proxy. Legge i log di accesso di Envoy e i flag di risposta (UH, NR, UF, URX, filter_chain_not_foun...

Perché usare K8s Istio Troubleshooting su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. K8s Istio Troubleshooting è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo K8s Istio Troubleshooting in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-istio-troubleshooting. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare K8s Istio Troubleshooting?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con K8s Istio Troubleshooting?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con K8s Istio Troubleshooting: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA K8s Istio Troubleshooting è gratuita?

Sì. È pubblicata su GitHub da k8s-servant con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇