Yashasvi Raj Pant
Yashasvi Raj Pant

Reputation: 1424

Is public IP we get in pod different from Node's public IP it is running?

I have pods running on different nodes. But when I execute the command curl -s checkip.dyndns.org, I am getting the same public IP for all. So, is the pod's public IP different from the public IP of the node it is running?

Also, when I execute the command kubectl get nodes -o wide, I get EXTERNAL-IP as <none> and there is only INTERNAL-IP.

I actually need the node's public IP address to access Kubernetes NodePort service.

Upvotes: 1

Views: 532

Answers (1)

gohm&#39;c
gohm&#39;c

Reputation: 15530

...when I execute the command curl -s checkip.dyndns.org, I am getting the same public IP for all.

That's your NAT public IP.

I actually need the node's public IP address...

The node needs to run in a subnet that allows direct (no NAT) Internet access and have public IP assigned. You can find this info on your cloud provider console; or in the node run ip addr show to see all IP(s) assigned to the node.

Upvotes: 2

Related Questions