Skip to content

Commit 22a0e39

Browse files
authored
Merge pull request #26790 from neha-viswanathan/26681-fix-target-port
use targetPort instead of containerPort
2 parents 4ac8d97 + 927b5af commit 22a0e39

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

content/en/docs/tasks/debug-application-cluster/debug-application.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -140,24 +140,11 @@ kubectl get pods --selector=name=nginx,type=frontend
140140
```
141141

142142
to list pods that match this selector. Verify that the list matches the Pods that you expect to provide your Service.
143-
144-
If the list of pods matches expectations, but your endpoints are still empty, it's possible that you don't
145-
have the right ports exposed. If your service has a `containerPort` specified, but the Pods that are
146-
selected don't have that port listed, then they won't be added to the endpoints list.
147-
148143
Verify that the pod's `containerPort` matches up with the Service's `targetPort`
149144

150145
#### Network traffic is not forwarded
151146

152-
If you can connect to the service, but the connection is immediately dropped, and there are endpoints
153-
in the endpoints list, it's likely that the proxy can't contact your pods.
154-
155-
There are three things to
156-
check:
157-
158-
* Are your pods working correctly? Look for restart count, and [debug pods](#debugging-pods).
159-
* Can you connect to your pods directly? Get the IP address for the Pod, and try to connect directly to that IP.
160-
* Is your application serving on the port that you configured? Kubernetes doesn't do port remapping, so if your application serves on 8080, the `containerPort` field needs to be 8080.
147+
Please see [debugging service](/docs/tasks/debug-application-cluster/debug-service.md) for more information.
161148

162149
## {{% heading "whatsnext" %}}
163150

0 commit comments

Comments
 (0)