/k8s-skills:k8s-cilium-troubleshootingfrom k8s-skills
Investigates and fixes Kubernetes networking failures on clusters using Cilium CNI: dropped traffic, policy denials, DNS failures, L7 HTTP 403 errors, and Cilium agent issues. Uses kubectl and Hubble, asks before changing anything.
Ships in k8s-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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).
bad address, time-outs) after an egress policy.Access denied although the app does not return that.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:
k8s-network-troubleshooting (Services and Kubernetes NetworkPolicies) and
k8s-workload-troubleshooting.k8s-node-troubleshooting.io.cilium/gateway-controller) does not
accept a Gateway or a route: k8s-gateway-api-troubleshooting.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.
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.
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.
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.
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 see | Reference |
|---|---|
Time-outs, Policy denied drops, a policy that allows the wrong peer, default deny surprises, DNS blocked by an egress policy, L7 403s, toFQDNs | references/policies.md |
Cilium pods not ready, unable to connect to Cilium agent, endpoints not ready, IPAM exhausted, kube-proxy replacement, MTU | references/agent-and-datapath.md |
What the common findings mean (Cilium 1.20):
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.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).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.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.
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.
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.
Checked against the Cilium 1.20 documentation and source (v1.20.4):
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
31 skills in this plugin
/k8s-aks-troubleshootingUse when a problem is specific to Azure Kubernetes Service (AKS): a cluster or node pool in "Failed" state, an upgrade or scale that fails ("UpgradeFailed", "violate the pod's disruption budget", "QuotaExceeded", "AllocationFailed"), a LoadBalancer Service stuck at <pending> ("SyncLoadBalancerFailed", "AuthorizationFailed"), an Azure Disk or Files PVC that fails ("ProvisioningFailed", "volume node affinity conflict", "Multi-Attach error", "Mount error(13)"), workload identity errors ("AADSTS700016", "AADSTS70021"), CoreDNS edits that AKS reverts, "error dialing backend", Azure Policy denials, or API server access (authorized IP ranges, private clusters, kubelogin, "User does not have access to the resource in Azure"). Investigates with kubectl and read-only az commands, and proposes fixes. Reads first and asks before changing anything./k8s-api-troubleshootingUse when the Kubernetes API server itself refuses or fails a request, before any controller acts on it: "failed calling webhook", "admission webhook ... denied the request", "ValidatingAdmissionPolicy ... denied request", a ReplicaSet with FailedCreate and no pods, an APIService "False (ServiceNotFound)", "FailedDiscoveryCheck" or "MissingEndpoints", "unable to retrieve the complete list of server APIs", a namespace stuck in Terminating, "no matches for kind" or "ensure CRDs are installed first", "strict decoding error: unknown field", a conversion webhook failure, "You must be logged in to the server (Unauthorized)", 429 "too many requests", "etcdserver:" errors, "Request entity too large" or "metadata.annotations: Too long". Investigates with kubectl get, describe, events and the health endpoints, and proposes fixes. Reads first and asks before changing anything./k8s-argocd-troubleshootingUse when Argo CD does not deploy or update an application in Kubernetes: an Application that is OutOfSync, Unknown, Degraded, Missing or Progressing, a ComparisonError ("app path does not exist", "unable to resolve ... to a commit SHA"), an InvalidSpecError ("do not match any of the allowed destinations in project"), a sync that fails ("one or more objects failed to apply"), auto-sync that never runs, resources that stay OutOfSync after a sync, or ApplicationSets that generate nothing. Investigates with kubectl get, describe, events and logs, and proposes fixes. Reads first and asks before changing anything./k8s-autoscaling-troubleshootingUse when Kubernetes autoscaling does not scale as expected: a HorizontalPodAutoscaler whose TARGETS show "<unknown>", "missing request for cpu", "unable to get metrics for resource cpu" or "FailedGetResourceMetric", an HPA stuck at maxReplicas ("TooManyReplicas") or not scaling down, "Metrics API not available" from kubectl top, metrics-server not Ready, a KEDA ScaledObject that is not Ready ("ScaledObjectCheckFailed") or creates no HPA, KEDA scalers failing, two autoscalers on one workload, or a VerticalPodAutoscaler without recommendations. Investigates with kubectl get, describe, events, logs and top, and proposes fixes. Reads first and asks before changing anything./k8s-cert-manager-troubleshootingUse when cert-manager does not issue or renew a certificate in Kubernetes: a Certificate that stays READY False, a CertificateRequest that is Pending, Denied or Failed, an Issuer or ClusterIssuer that is not Ready ("Error getting keypair for CA issuer"), "Referenced \"Issuer\" not found", ACME Orders or Challenges stuck pending (HTTP-01, DNS-01, rate limits), a certificate that expired or did not renew, or "failed calling webhook \"webhook.cert-manager.io\"" when applying resources. Investigates with kubectl get, describe, events and logs, and proposes fixes. Reads first and asks before changing anything./k8s-cloudnative-pg-troubleshootingUse when a CloudNativePG (CNPG) PostgreSQL Cluster in Kubernetes is not healthy: a Cluster stuck in "Setting up primary", "Creating a new replica" or "Waiting for the instances to become active", fewer ready instances than requested, an initdb or join pod that is Pending or in CreateContainerConfigError, PVCs that stay Pending, a bootstrap Secret that is missing, a replica that cannot be scheduled (pod anti-affinity, nodeSelector, taints), "Not enough disk space", failing WAL archiving or backups (ContinuousArchiving, LastBackupSucceeded False), a failover or switchover that does not finish, "Invalid cluster definition" or "Cluster is unrecoverable", and operator errors. Investigates with kubectl get, describe, events and logs, never reading Secrets, and proposes fixes. Reads first and asks before changing anything.npx claudepluginhub k8s-servant/k8s-skills --plugin k8s-skills2 plugins in one repository ship this exact skill · first indexed Nov 1, 2026
Other plugins' skills for the same job