Loading

How to find out a pod's IP address and the node where it is running in PCE or RTF

Publiceringsdatum: Mar 2, 2024
Uppgift

GOAL

To tell on which node a pod is running and the IP assigned to it.

Steg
Begin by opening a terminal to any master node in your cluster and then execute the following to get into the planet container:
sudo gravity enter
Now you only have to query for pods using the --output=wide option. For example, to get all pod details to do:
kubectl get pods --all-namespaces --output=wide
The output will look like this:
NAMESPACE           NAME                                                              READY   STATUS      RESTARTS   AGE    IP              NODE        NOMINATED NODE   READINESS GATES
access-management   authentication-server-69cf8c646f-2xrzg                            2/2     Running     0          19h    10.244.35.53    10.1.0.40   <none>           <none>
access-management   authentication-server-69cf8c646f-9xpw9                            2/2     Running     0          19h    10.244.56.64    10.1.0.70   <none>           <none>
access-management   authentication-server-69cf8c646f-s27xd                            2/2     Running     0          19h    10.244.35.37    10.1.0.40   <none>           <none>
access-management   authentication-server-69cf8c646f-tmqdh                            2/2     Running     0          19h    10.244.34.63    10.1.0.20   <none>           <none>
amc                 auth-proxy-6cb6bd9c8-5855j                                        1/1     Running     0          18h    10.244.34.95    10.1.0.20   <none>           <none>
amc                 auth-proxy-6cb6bd9c8-fdccw                                        1/1     Running     0          18h    10.244.56.102   10.1.0.70   <none>           <none>
Column NODE will tell you the IP address of the node where the pod is running.
The IP column is the individual pod IP address.
This information is very useful for troubleshooting networking issues between nodes or pods.

Now you are ready to leave the planet container:
exit
Knowledge-artikelnummer

001116803

 
Laddar
Salesforce Help | Article