Skip to content

Commit b8be2e7

Browse files
use targetPort instead of containerPort
1 parent 3db583a commit b8be2e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ kubectl get pods --selector=name=nginx,type=frontend
142142
to list pods that match this selector. Verify that the list matches the Pods that you expect to provide your Service.
143143

144144
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
145+
have the right ports exposed. If your service has a `targetPort` specified, but the Pods that are
146146
selected don't have that port listed, then they won't be added to the endpoints list.
147147

148148
Verify that the pod's `containerPort` matches up with the Service's `targetPort`
@@ -157,7 +157,7 @@ check:
157157

158158
* Are your pods working correctly? Look for restart count, and [debug pods](#debugging-pods).
159159
* 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.
160+
* Is your application serving on the port that you configured? If your application serves on 8080, the `targetPort` field needs to be 8080.
161161

162162
## {{% heading "whatsnext" %}}
163163

0 commit comments

Comments
 (0)