This scenario has explained how to launch a Kubernetes cluster. In future scenarios you'll learn more details about Kubernetes, starting with launching your first example application.

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Lab 3

Step 1 of 7

Step 1 - Initialise Master

Docker allows you to specify different types of networking for your containers. One type that is very handy and used in Kubernetes is the container type. It allows you to share a network between two containers. In this exercise, you will illustrate this with three bash​ commands:

On a Docker host, start a busybox​ container that just waits. Then, start another container, using the --net=container:​ option

docker run -d --name=source busybox sleep 3600

docker run -d --name=same-ip --net=container:source busybox sleep 3600

Now, check the IP address of each container, something like the following should do:

docker exec -ti same-ip ifconfig

You should see that the second container inherited the same IP address as the source container. That is because, using the Docker --net​ option, we were able to use the same networking namespace to both containers.

That is what makes a Kubernetes POD,​ a set of containers running on the same host and that share the same networking namespace. This is what Kubernetes calls the single IP-per-Pod model: making a Pod almost look like a virtual machine running multiple processes with a single IP address.