Troubleshooting·Certified Kubernetes Application Developer
A Service With Endpoints and No Traffic
The Service failure that passes every check people run first. This walks the three port numbers that have to agree, asks the container which one it actually serves, and fixes it with a single field.
Services and Networking Guide 39 of 44 Intermediate
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 15 min
curl's exit codes are the diagnosis here: 7 is a failure to connect, 28 is a timeout, and they mean different things.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a Service has endpoints and still refuses connections. This matters because it passes every check people run first - the selector matches, the Pods are Ready, the slice is populated - and the fault is one number further down.
- building a Service that looks entirely healthy and serves nothing at all
- reading curl's exit code, where 7 is a refusal rather than a timeout
- lining up the three numbers that have to agree - port, targetPort, and what the container serves
- asking the container from inside what it is genuinely listening on
- patching the single wrong field and proving the fix
Before you start
- guide 66 - the failure where there are no endpoints at all, which this one is deliberately not.
-
A Service that looks entirely healthy
-
Prove the symptom from a client
-
Read the three numbers that have to agree
-
Ask the container what it is actually listening on
-
Fix the one field and prove it