You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

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. 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.MivaSo where'sthe menu?your clusternode-1node-2node-3node-4otherapps

    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. 2 Her phone must send a request, a message that asks for the page. And a request goes nowhere without an address.MivaTo:her request

    Her phone must send a request, a message that asks for the page. And a request goes nowhere without an address.

  3. 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.10.244.1.410.244.2.410.244.3.4IP addressesexample numbers

    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. 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.node-1node-2node-3node-4otherappsorder appTo: 10.244.2.4Here'sthe menu!

    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. 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.MivaTo: 10.244.2.4?10.244.2.4your cluster10.244.2.4an office10.244.2.4a homeexample numbers

    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. 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?Miva, outsideyour clusternode-1node-2node-3node-4otherappscafe-menu:10.244.2.4

    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?

  7. Quick check

    Two newcomers want the menu.A new app startsin a pod on node-1.Can it get the menuat a pod's address?And Rono's laptop,at home?

    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.

  8. Go further

    Two names behind those numbers.10.244.2.4IP address, pod IPIP is short for InternetProtocol, the rules forsending a message to anaddress. A pod's addressis its pod IP10.244.2.410.244.2.410.244.2.4private addressan address for inside onenetwork. The internetcarries no request to it,and many networksuse the same ones

    Two names behind those numbers.

Next episode Pod IP addresses: why a replaced Kubernetes pod comes back with a new one

Share this comic

More comics