Logo de K8s Envoy Troubleshooting

K8s Envoy Troubleshooting

Organização
k8s-servant
k8s-envoy-troubleshooting

Use quando um proxy Envoy no Kubernetes falha ao processar solicitações: clientes recebem 503 "no healthy upstream", 503 "upstream connect error or disconnect/reset before headers. reset reason: remote connection failure", 404 com corpo vazio ou 504 "upstream request timeout"; os logs de acesso mostram flags de resposta (UH, UF, NR, NC, UT, UO, URX, UC); ou o Envoy falha ao iniciar ("has unknown fields", "no such field", "route: unknown cluster"). Abrange o Envoy executado diretamente (um Deployment com bootstrap próprio, um proxy frontal, um sidecar) e o proxy usado pelo Contour, Emissary ou Gloo; lê o log de acesso, o bootstrap e os endpoints administrativos somente leitura do Envoy. Investiga com kubectl get e logs, e propõe correções. Primeiro analisa e pergunta antes de alterar qualquer coisa.

Visão geral

Publicado pork8s-servant
Repositóriok8s-skills
Nome da habilidadek8s-envoy-troubleshooting
Estrelas
36
Forks
7
Arquivos incluídos
2
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 2

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por k8s-servant no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA K8s Envoy Troubleshooting no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-envoy-troubleshooting
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse 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-envoy-troubleshooting .claude/skills/k8s-envoy-troubleshooting
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative K8s Envoy Troubleshooting em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega K8s Envoy Troubleshooting automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, K8s Envoy Troubleshooting não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Envoy troubleshooting

Find out why Envoy does not pass a request on, 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.

Envoy takes a request on a listener, matches a route by the Host header (domains) and the path, and sends it to a cluster, whose hosts come from DNS (STRICT_DNS, LOGICAL_DNS), a static list or a control plane (EDS). When it cannot, it answers itself and records why: in the access log as a response flag (UH, UF, NR ...) and %RESPONSE_CODE_DETAILS%, and in its stats. A standalone Envoy reads its bootstrap once at start, so a config error stops it and an edited ConfigMap needs a restart.

The commands use placeholders: my-namespace, my-envoy (the Envoy workload and its ConfigMap), my-envoy-admin (a Service in front of the admin port, if there is one), my-app (the backend) and my-web (a client). Replace them with the real names. Never read Secrets. The bootstrap can hold TLS keys inline (inline_string): never repeat them. Never fetch a full /config_dump, any *_secrets resource, or /certs; use config_dump with ?resource= for clusters, listeners and routes only.

When to use

  • Clients get 503, 504 or 404 from Envoy, or connections reset.
  • Envoy pods crash at start or are not Ready.
  • One backend gets no traffic through Envoy, or all of it.

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:

  • Envoy runs as an Istio sidecar or gateway: k8s-istio-troubleshooting; as Envoy Gateway's proxy: k8s-envoy-gateway-troubleshooting. Their control planes write the config, so start there.
  • The backend Service has no endpoints, or a NetworkPolicy blocks Envoy: k8s-network-troubleshooting.
  • The backend pods themselves fail: k8s-workload-troubleshooting.
  • Contour: kubectl get httpproxy -A shows each HTTPProxy's status (valid, or invalid with the reason); invalid ones are ignored. Emissary and Gloo report errors in their resources' status and their controller logs.

Investigate

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

1. See Envoy's pods and the client's result.

bash
kubectl get pods -n my-namespace -o wide
kubectl logs -n my-namespace deployment/my-web --tail=10

2. Read Envoy's log: the access log (if one is configured) with the response flag and details for each request, and Envoy's own messages. After a crash, read the previous container.

bash
kubectl logs -n my-namespace deployment/my-envoy --tail=50
kubectl logs -n my-namespace deployment/my-envoy --previous --tail=20

3. Read the bootstrap: listeners, routes (domains, match, cluster) and clusters (type, addresses, ports, timeouts). Do not repeat keys you see.

bash
kubectl get deployment my-envoy -n my-namespace -o jsonpath='{.spec.template.spec.containers[0].args}{"\n"}{range .spec.template.spec.volumes[*]}{.name}{" "}{.configMap.name}{.secret.secretName}{"\n"}{end}'
kubectl get configmap my-envoy -n my-namespace -o yaml
kubectl get services,endpointslices -n my-namespace

4. Ask Envoy's admin interface, if it listens on a pod address and your credentials allow get on services/proxy or pods/proxy (the built-in view role does not). These are read-only: Envoy answers 405 to a GET on any endpoint that changes state. If admin listens on 127.0.0.1 only (the docs' recommendation, Istio, Envoy Gateway, Contour), there is no kubectl path to it; say so and work from the log.

bash
kubectl get --raw /api/v1/namespaces/my-namespace/services/my-envoy-admin:admin/proxy/clusters
kubectl get --raw "/api/v1/namespaces/my-namespace/services/my-envoy-admin:admin/proxy/stats?filter=cluster.my-app."
kubectl get --raw "/api/v1/namespaces/my-namespace/services/my-envoy-admin:admin/proxy/config_dump?resource=static_route_configs"
kubectl get --raw /api/v1/namespaces/my-namespace/services/my-envoy-admin:admin/proxy/server_info

5. Open the matching reference and follow its steps:

What you seeReference
A response flag, an error body, /clusters and stats, DNS clusters, health checks, timeouts, circuit breakersreferences/responses-and-upstreams.md
A crash at start, bootstrap errors, the admin interface and what it may show, imagesreferences/bootstrap-and-admin.md

Read the results

What the common findings mean (Envoy 1.40):

  • 503 no healthy upstream, flag UH, details no_healthy_upstream: the cluster has no healthy host. With STRICT_DNS, a name that does not exist counts as a successful lookup with no addresses: /clusters shows no host lines for the cluster, membership_total is 0, and update_success keeps rising, so the DNS name is the first thing to check against the Services.
  • 503 upstream connect error or disconnect/reset before headers. reset reason: remote connection failure, flag UF: Envoy reached a host but the connection was refused (a wrong port, nothing listening). The access log's %UPSTREAM_TRANSPORT_FAILURE_REASON% adds delayed connect error: Connection refused; since 1.39 it is no longer in the response body. reset reason: connection timeout means no answer within connect_timeout (a NetworkPolicy, a dropped port).
  • 404 with an empty body, flag NR, details route_not_found: no virtual host's domains match the request's Host header, or no route matches the path.
  • 504 upstream request timeout, flag UT: the backend did not answer within the route timeout (15s by default).
  • Envoy exits at start with Protobuf message (type envoy.config.bootstrap.v3.Bootstrap reason INVALID_ARGUMENT: ... no such field: '...') has unknown fields: a misspelled or misplaced field; the @ <path> names where. route: unknown cluster '...' means a static route names a cluster that is not defined.

State the cause in one sentence, then the evidence you saw (the client's status and body, the access-log flag and details, the bootstrap field, /clusters), then the proposed fix.

Proposed fix

Show each fix to the user before running it: what it changes and how to undo it. Envoy's bootstrap serves every route and backend behind it: never change it yourself; hand it to the user as a proposed fix. Prefer fixing the source (the Helm values, the manifest in Git, or the control plane's resources). Never use the admin endpoints that change state (/quitquitquit, /healthcheck/fail, /drain_listeners, /logging, /reset_counters, /runtime_modify).

Fix the bootstrap in its source, apply it and restart Envoy so it reads it:

Proposed fix: review before running. The agent does not run this.

bash
kubectl apply -f my-envoy-configmap.yaml
kubectl rollout restart deployment/my-envoy -n my-namespace
# Undo: kubectl apply -f my-envoy-configmap-before.yaml, then restart my-envoy again

If an edited ConfigMap is already in place but Envoy still runs the old bootstrap, restart it:

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

bash
kubectl rollout restart deployment/my-envoy -n my-namespace
# Undo: none needed; the restart only recreates the pods with the same template

Sources

Checked against the Envoy 1.40 documentation and source (v1.40.1):

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA K8s Envoy Troubleshooting faz?

Use quando um proxy Envoy no Kubernetes falha ao processar solicitações: clientes recebem 503 "no healthy upstream", 503 "upstream connect error or disconnect/reset before headers. reset reason: remote connection failure", 404 com corpo vazio ou 504 "upstream request timeout"; os logs de acesso mostram flags de resposta (UH, UF, NR, NC, UT, UO, URX, UC); ou o Envoy falha ao iniciar ("has unknown fields", "no such field", "route: unknown cluster"). Abrange o Envoy executado diretamente (um Deployment com bootstrap próprio, um proxy frontal, um sidecar) e o proxy usado pelo Contour, Emissary...

Por que usar K8s Envoy Troubleshooting no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade K8s Envoy Troubleshooting é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar K8s Envoy Troubleshooting no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-envoy-troubleshooting. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar K8s Envoy Troubleshooting?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com K8s Envoy Troubleshooting?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar K8s Envoy Troubleshooting com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA K8s Envoy Troubleshooting é gratuita?

Sim. A habilidade é publicada no GitHub por k8s-servant sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇