skills/core/service-debug/SKILL.md
Diagnose Service connectivity issues (empty Endpoints, selector mismatch, port mismatch, no backend pods). Checks Service, Endpoints, and target pods to identify why traffic is not reaching backends.
npx skillsauth add scitix/siclaw service-debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When a Service is unreachable, returns connection refused, or has no backends, follow this flow to identify the root cause.
Scope: This skill is for diagnosis only. Once you identify the root cause, report it to the user and stop. Do NOT attempt to modify the Service, Endpoints, or pod specs — that should be left to the user.
kubectl get svc <service> -n <ns> -o wide
Confirm the Service exists and note:
None unless it is a headless servicekubectl get endpoints <service> -n <ns>
ENDPOINTS column shows <none> or is empty, no pods match the Service's selector — go to step 3.For more detail (including notReadyAddresses):
kubectl describe endpoints <service> -n <ns>
The Service's selector must match labels on running, ready pods.
Get the Service selector:
kubectl get svc <service> -n <ns> -o jsonpath='{.spec.selector}'
List pods that match the selector:
kubectl get pods -n <ns> -l <key>=<value> -o wide
(Replace <key>=<value> with each selector pair from the previous command.)
If no pods match:
If pods exist but none are Ready:
pod-crash-debug or check readiness probesVerify that the Service port, targetPort, and the container's actual listening port all align.
kubectl get svc <service> -n <ns> -o jsonpath='{range .spec.ports[*]}port={.port} targetPort={.targetPort} protocol={.protocol}{"\n"}{end}'
kubectl get pod <backend-pod> -n <ns> -o jsonpath='{range .spec.containers[*].ports[*]}containerPort={.containerPort} protocol={.protocol}{"\n"}{end}'
The Service's targetPort must match one of the container's containerPort values (or the named port). If they don't match, traffic will be sent to the wrong port.
Note: if the container does not declare containerPort, the traffic may still work — containerPort is informational. The real check is whether the application is actually listening on the targetPort.
The Service has no endpoints because no running, ready pods match its label selector.
Possible causes:
Advise the user to compare the Service selector with the pod labels and ensure pods are running and ready.
Connection refused — Port mismatch or application not listeningEndpoints exist, but connections to the Service are refused.
targetPort may not match the port the application is actually listening onCheck the application logs:
kubectl logs <backend-pod> -n <ns> --tail=50
ExternalName not resolving — DNS-based service issueExternalName services return a CNAME record. If the target hostname is unreachable or doesn't resolve, the service will appear broken.
kubectl get svc <service> -n <ns> -o jsonpath='{.spec.externalName}'
Verify the external name resolves from within the cluster (see dns-debug skill).
NodePort / LoadBalancer not reachable from outside — External access issueFor NodePort: verify the node's firewall allows the allocated port.
kubectl get svc <service> -n <ns> -o jsonpath='{.spec.ports[*].nodePort}'
For LoadBalancer: check the external IP assignment.
kubectl get svc <service> -n <ns>
If EXTERNAL-IP shows <pending>, the cloud load balancer provisioner may have failed:
kubectl describe svc <service> -n <ns>
Check events for errors from the cloud controller manager.
ClusterIP: None) — Expected behaviorHeadless services do not get a cluster IP. DNS returns the individual pod IPs directly. This is by design for StatefulSets and services that need direct pod addressing.
If clients are getting connection refused, verify the individual pod IPs are correct and the pods are ready.
sessionAffinity: ClientIP, connections from the same source IP are routed to the same pod — if that pod becomes unhealthy, the session sticks to it until the timeout.EndpointSlices (default in K8s 1.21+) replace Endpoints for large-scale services. You can check them with: kubectl get endpointslices -n <ns> -l kubernetes.io/service-name=<service>.networkpolicy-debug to check.development
Guide for writing and improving Siclaw skills. Read this when creating or modifying a skill. Covers skill directory layout, SKILL.md format, script execution modes, and best practices.
development
Guides the user to the Siclaw Web page to manage Skills. Use this guide when the user requests to create, edit, or view a Skill in a Channel conversation.
development
Retrieve and analyze Volcano scheduler logs. Filter by keyword, time range, or pod name to debug scheduling decisions.
tools
View Volcano scheduler configuration. Check scheduler ConfigMap, actions, plugins, and tier settings.