What happens when a visitor opens your app on Kubernetes
Kubernetes pod IP addresses: why your app runs and no visitor can open it
An app runs on Kubernetes, in healthy pods. Yet a visitor opens it on a phone, and nothing loads. Every pod has an IP address. So what is missing?
-
1
You built the menu app of Rono's café. It runs on your cluster, 4 computers called nodes, in 3 pods: the boxes Kubernetes runs apps in. Miva, on her way to the café, wants it on her phone.
-
2
Her phone must send a request, a message that asks for the page. And a request goes nowhere without an address.
-
3
Inside the cluster, each pod gets an address of its own. It is called an IP address: here, four numbers with dots in between.
-
4
Rono's order app runs in a pod too, on node-4. It sends its request to the address of your pod on node-2, and the menu comes right back.
-
5
You send Miva that address. Her request finds no road on the internet: your pods' addresses are private, and many other networks use the same numbers.
-
6
Miva stays outside for now. Inside, the order app writes down your pod's address on node-2 and sends every request there. Can it count on that address?
-
Quick check
Two newcomers want the menu.
Show the answer
The new app can: it runs inside the cluster, where pod addresses work. Rono's laptop cannot: it is out on the internet, like Miva's phone.
-
Go further
Two names behind those numbers.