Logotipo de K8s Cilium Troubleshooting

K8s Cilium Troubleshooting

Organización
k8s-servant
k8s-cilium-troubleshooting

Úsala cuando falla la red en un clúster de Kubernetes que usa Cilium como CNI: se pierde o agota el tiempo de espera del tráfico entre pods tras aplicar una CiliumNetworkPolicy o CiliumClusterwideNetworkPolicy; aparecen descartes «Policy denied» en Hubble; el DNS deja de resolver tras una política de salida; una regla L7 devuelve HTTP 403 «Access denied»; las reglas toFQDNs no coinciden; los pods se quedan en ContainerCreating con «unable to connect to Cilium agent»; los pods del agente o del operador de Cilium no están listos; los CiliumEndpoints no están listos, o se agotan las direcciones IP de IPAM. Investiga con kubectl get, describe, events y logs; pregunta antes de ejecutar cilium-dbg o hubble dentro del agente y propone soluciones. Primero lee la información y pregunta antes de cambiar nada.

Descripción general

Editork8s-servant
Repositoriok8s-skills
Nombre de la habilidadk8s-cilium-troubleshooting
Estrellas
36
Forks
7
Archivos incluidos
2
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 2

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por k8s-servant en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA K8s Cilium Troubleshooting en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-cilium-troubleshooting
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese 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-cilium-troubleshooting .claude/skills/k8s-cilium-troubleshooting
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa K8s Cilium Troubleshooting en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga K8s Cilium Troubleshooting automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que K8s Cilium Troubleshooting no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Cilium troubleshooting

Find out why traffic fails on a cluster that runs Cilium, 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.

Cilium gives each pod a CiliumEndpoint with a security identity derived from its labels, and enforces Kubernetes NetworkPolicies, CiliumNetworkPolicies (one namespace) and CiliumClusterwideNetworkPolicies by identity. Once any policy selects an endpoint for a direction (ingress or egress), only what some policy allows gets through in that direction. L7 rules (HTTP, DNS) send the traffic through Cilium's Envoy proxy. Hubble records each flow with its verdict.

The commands use placeholders: my-namespace, my-app (the server) and my-web (the client), my-policy, and cilium-xxxxx (the Cilium agent pod on the node of the pod you investigate). Replace them with the real names. The built-in view role cannot read cilium.io objects (Cilium adds nothing to it); if they are forbidden, say so and ask the user for them. Never read Secrets (Cilium keeps its CA and Cluster Mesh credentials in Secrets).

When to use

  • Pods cannot reach each other, or a Service, on a cluster with Cilium; often right after a policy change.
  • DNS lookups fail (bad address, time-outs) after an egress policy.
  • Requests get HTTP 403 Access denied although the app does not return that.
  • Pods stay ContainerCreating with a Cilium CNI error, or Cilium's own pods are not ready.

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, a wrong selector or port, or the target pods are not Ready: k8s-network-troubleshooting (Services and Kubernetes NetworkPolicies) and k8s-workload-troubleshooting.
  • A node is NotReady: k8s-node-troubleshooting.
  • Cilium's Gateway API support (the class io.cilium/gateway-controller) does not accept a Gateway or a route: k8s-gateway-api-troubleshooting.

Investigate

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

1. Check Cilium itself: the agent on each node, the operator, Envoy.

bash
kubectl get pods -n kube-system -l k8s-app=cilium -o wide
kubectl get deployments,daemonsets -n kube-system | grep -i -E "cilium|hubble"
kubectl get ciliumnodes

2. Read the client's error and the endpoints. A time-out usually means a drop by policy; bad address means DNS; a 403 with Access denied comes from an L7 rule.

bash
kubectl logs -n my-namespace deployment/my-web --tail=20
kubectl get ciliumendpoints -n my-namespace
kubectl get pods -n my-namespace --show-labels -o wide

A CiliumEndpoint should be ready. Pods without one (hostNetwork pods, pods started before Cilium) are not managed and get no policy.

3. Find the policies that select the pods, in both directions: ingress on the server, egress on the client, and cluster-wide ones.

bash
kubectl get ciliumnetworkpolicies,networkpolicies -n my-namespace
kubectl get ciliumclusterwidenetworkpolicies
kubectl get ciliumnetworkpolicy my-policy -n my-namespace -o yaml
kubectl describe ciliumnetworkpolicy my-policy -n my-namespace

Compare each policy's endpointSelector with the pods' labels, and its fromEndpoints, toEndpoints, toPorts and rules with the traffic that fails.

4. Ask Cilium what it drops. Find the agent pod on the node of the client or server (step 1 and the pod's node), then read the recent dropped flows and the endpoints' policy state. These run a reading command inside the agent, so ask first:

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

bash
kubectl exec cilium-xxxxx -n kube-system -c cilium-agent -- hubble observe --last 50 --namespace my-namespace --verdict DROPPED
kubectl exec cilium-xxxxx -n kube-system -c cilium-agent -- cilium-dbg endpoint list

hubble observe needs Hubble, which is on by default. Without it, cilium-dbg status and the agent's logs are the fallback.

5. Open the matching reference and follow its steps:

What you seeReference
Time-outs, Policy denied drops, a policy that allows the wrong peer, default deny surprises, DNS blocked by an egress policy, L7 403s, toFQDNsreferences/policies.md
Cilium pods not ready, unable to connect to Cilium agent, endpoints not ready, IPAM exhausted, kube-proxy replacement, MTUreferences/agent-and-datapath.md

Read the results

What the common findings mean (Cilium 1.20):

  • Client time-outs, and Hubble shows Policy denied DROPPED with INGRESS DENIED from the client to the server: a policy selects the server for ingress and none allows this client. Compare the policy's fromEndpoints labels with the client's labels.
  • The same with EGRESS DENIED: a policy selects the client for egress and does not allow the destination.
  • bad address or DNS time-outs right after an egress policy on the client: the policy put the client in default-deny for egress and does not allow DNS to kube-dns (UDP and TCP 53, k8s-app: kube-dns in kube-system).
  • HTTP 403 with the body Access denied: an L7 HTTP rule allows the connection but not that method or path; Cilium's Envoy answers instead of the app.
  • cilium-dbg endpoint list shows Enabled for a direction: some policy selects that endpoint there, so default deny applies to it. Disabled means no policy selects it in that direction.
  • A CiliumNetworkPolicy with VALID False: Cilium rejected it; describe shows why.

State the cause in one sentence, then the evidence you saw (the policy and its selectors, the pods' labels, the drop verdict, the client's error), then the proposed fix.

Proposed fix

Show each fix to the user before running it: what it changes and how to undo it. Creating, changing or deleting a network policy changes what traffic is allowed, often for more pods than the one that fails: never run it yourself; hand the change to the user as a proposed fix, with the narrowest rule that allows the traffic. Changing Cilium's configuration (cilium-config, Helm values) and restarting Cilium are for the cluster's administrators. Prefer fixing the policy in the source it is deployed from. Write each undo with the values you found.

Allow my-web into my-app on port 80, next to the existing rule (the user applies it):

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

bash
kubectl apply -f my-app-ingress-from-my-web.yaml
# Undo: kubectl delete -f my-app-ingress-from-my-web.yaml

with my-app-ingress-from-my-web.yaml a CiliumNetworkPolicy in my-namespace whose endpointSelector is app: my-app and whose ingress allows fromEndpoints app: my-web on toPorts port 80/TCP. Policies add up, so the existing rule stays.

Sources

Checked against the Cilium 1.20 documentation and source (v1.20.4):

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA K8s Cilium Troubleshooting?

Úsala cuando falla la red en un clúster de Kubernetes que usa Cilium como CNI: se pierde o agota el tiempo de espera del tráfico entre pods tras aplicar una CiliumNetworkPolicy o CiliumClusterwideNetworkPolicy; aparecen descartes «Policy denied» en Hubble; el DNS deja de resolver tras una política de salida; una regla L7 devuelve HTTP 403 «Access denied»; las reglas toFQDNs no coinciden; los pods se quedan en ContainerCreating con «unable to connect to Cilium agent»; los pods del agente o del operador de Cilium no están listos; los CiliumEndpoints no están listos, o se agotan las direccione...

¿Por qué usar K8s Cilium Troubleshooting en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. K8s Cilium Troubleshooting está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo K8s Cilium Troubleshooting en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/k8s-servant/k8s-skills/tree/main/skills/k8s-cilium-troubleshooting. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar K8s Cilium Troubleshooting?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar K8s Cilium Troubleshooting?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar K8s Cilium Troubleshooting con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA K8s Cilium Troubleshooting?

Sí. k8s-servant la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇