/k8s-skills:k8s-opentelemetry-collector-troubleshootingfrom k8s-skills
Diagnoses why telemetry fails to pass through the OpenTelemetry Collector on Kubernetes: startup crashes, connection refused, export errors, memory limiter issues, missing RBAC, or Operator problems. Investigates with kubectl and collector metrics, then proposes fixes.
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 telemetry does not pass through the OpenTelemetry Collector, 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.
A collector's config defines receivers (OTLP on 4317 for gRPC and 4318 for HTTP,
Prometheus, ...), processors (memory_limiter, batch, k8s_attributes, ...),
exporters (otlp_grpc, otlp_http, debug, ...) and extensions
(health_check, ...), and then the service.pipelines that connect them. A component
that no pipeline uses is not started at all, without a warning. The collector checks the
config at start and exits with Error: ... when it is invalid. At run time it logs
failed exports with the exporter's name and the error. Collectors often run as an agent
(DaemonSet, sidecar) that forwards to a gateway (Deployment), so follow the data hop by
hop.
The commands use placeholders: my-namespace, my-collector (the collector workload,
its ConfigMap and Service), my-backend (where it exports to) and my-app (an
application that sends telemetry). Replace them with the real names. Never read Secrets.
Exporters and auth extensions can carry API keys and tokens in headers: read the
receivers, the pipelines and each exporter's endpoint, never dump whole exporters or
extensions blocks, and never repeat a header value. Do not use print-config: it
resolves ${env:...} values, which may come from Secrets.
connection refused, timeouts).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.k8s-loki-troubleshooting, k8s-prometheus-troubleshooting.k8s_attributes or the operator is refused by RBAC: k8s-rbac-troubleshooting.k8s-cert-manager-troubleshooting.Work through the steps in order. Stop when you have the cause and its evidence.
1. See the collector and the application. A crash points to the config; an application error names what it could not reach.
kubectl get pods -n my-namespace -o wide
kubectl logs -n my-namespace deployment/my-app --tail=20
kubectl get services,endpointslices -n my-namespace
2. Read the collector's log, current and before the last restart: config errors,
the endpoints its receivers listen on (Starting GRPC server, Starting HTTP server),
and export failures.
kubectl logs -n my-namespace deployment/my-collector --tail=100
kubectl logs -n my-namespace deployment/my-collector --previous --tail=30
kubectl logs -n my-namespace deployment/my-collector --tail=500 | grep -E 'error|warn|Starting (GRPC|HTTP) server|Exporting failed'
3. Read the config's pipelines, receivers and exporter endpoints, not the whole config.
kubectl get deployment my-collector -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-collector -n my-namespace -o jsonpath='{.data.config\.yaml}' | grep -E '^ *(receivers|exporters|processors|pipelines|protocols|grpc|http|endpoint|traces|metrics|logs):'
4. If the OpenTelemetry Operator manages the collector, read its resource and its status.
kubectl get opentelemetrycollectors,instrumentations -A
kubectl get opentelemetrycollector my-collector -n my-namespace -o jsonpath='{.spec.mode}{" "}{.spec.image}{"\n"}{.spec.config.service}{"\n"}{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}'
kubectl get events -n my-namespace --field-selector involvedObject.kind=OpenTelemetryCollector
5. Open the matching reference and follow its steps:
| What you see | Reference |
|---|---|
| A crash at start, config errors, components not in a pipeline, localhost receivers, ports and protocols | references/config-and-receivers.md |
| Export failures, retries, queues, memory_limiter, k8s_attributes, internal metrics, the operator and auto-instrumentation | references/export-and-operator.md |
What the common findings mean (collector 0.163):
Error: invalid configuration: service::pipelines::logs: references receiver "otlp/app" which is not configured: a pipeline names a component that has no
definition (a typo, or a missing /name suffix). The collector exits; CrashLoopBackOff.unknown type: "..." for id: "..." (valid values: [...]): a component type this
distribution does not include, or a misspelled one. The core image has fewer
components than contrib and k8s.connection refused from the collector's Service, and the log shows
Starting GRPC server {"endpoint": "127.0.0.1:4317"} (or no such line for that
receiver): the receiver listens on localhost only; 0.0.0.0 shows as [::]:4317. Since v0.104.0 the OTLP receiver
defaults to localhost; in Kubernetes it needs endpoint: 0.0.0.0:4317 (or the pod
IP). A receiver missing from every pipeline gives the same symptom and logs no
Starting line at all.Exporting failed. Will retry the request after interval. with "error": "rpc error: code = Unavailable desc = no children to pick from": the gRPC exporter's
endpoint resolves to no address (a misspelled or missing Service); gRPC does not say
"no such host". connection refused or context deadline exceeded instead means the
name resolves but nothing answers (the backend is down, a wrong port, a
NetworkPolicy). Logged at info level; data waits in the
queue until retries run out (Dropping data., no more retries left).Exporting failed. Rejecting data. with sending queue is full: the backend is too
slow or down for longer than the queue holds.Memory usage is above soft limit. Refusing data.: the memory_limiter protects
the collector; senders get data refused due to high memory usage and retry.State the cause in one sentence, then the evidence you saw (the log line, the config entry, the application's error), then the proposed fix.
Show each fix to the user before running it: what it changes and how to undo it. A collector's config is shared by every application that sends to it: never change it yourself; hand it to the user as a proposed fix. Prefer fixing the source (the Helm values, the OpenTelemetryCollector resource, the manifest in Git). The collector reads its config at start, so a changed ConfigMap needs a restart (the operator rolls its collectors itself). Write each undo with the values you found.
Fix the config in its source, apply it and restart the collector:
Proposed fix: review before running. The agent does not run this.
kubectl apply -f my-collector-config.yaml
kubectl rollout restart deployment/my-collector -n my-namespace
# Undo: kubectl apply -f my-collector-config-before.yaml, then restart my-collector again
Once the collector works, restart an application whose client gave up, so it retries:
Ask first: the agent runs this only after the user approves it.
kubectl rollout restart deployment/my-app -n my-namespace
# Undo: none needed; the restart only recreates the pods with the same template
Checked against the OpenTelemetry documentation and the collector source (core and contrib v0.163.0, distribution v0.163.2) and the operator v0.162.0:
localhost default:
core CHANGELOG v0.104.0
and otlpreceiver factory.go.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub k8s-servant/k8s-skills --plugin k8s-skills31 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-cilium-troubleshootingUse when networking fails on a Kubernetes cluster that runs Cilium as its CNI: traffic between pods dropped or timing out after a CiliumNetworkPolicy or CiliumClusterwideNetworkPolicy, "Policy denied" drops in Hubble, DNS that stops resolving after an egress policy, HTTP 403 "Access denied" from an L7 rule, toFQDNs rules that do not match, pods stuck ContainerCreating with "unable to connect to Cilium agent", Cilium agent or operator pods not ready, CiliumEndpoints not ready, or IPAM exhaustion. Investigates with kubectl get, describe, events and logs, asks before running cilium-dbg or hubble inside the agent, and proposes fixes. Reads first and asks before changing anything.2 plugins in one repository ship this exact skill · first indexed Oct 27, 2026
Other plugins' skills for the same job