Difficulty: Beginner
Estimated Time: 10 minutes

This scenario explains the different aspects of launching a Kubernetes cluster.

The environment has a Docker installation configured, running on a host called docker. Everything else required we'll launch as containers.

More information can be found at http://kubernetes.io/v1.1/docs/getting-started-guides/

Here's a diagram of what the final cluster will look like:

k8s Single Node on Docker

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.

Launch Kubernetes Cluster - Fourbends

Step 1 of 8

Step 1 - Etcd

Etcd is a "Distributed reliable key-value store for the most critical data of a distributed system". Kubernetes uses Etcd to store state about the cluster and service discovery between nodes. This state includes what nodes exist in the cluster, which nodes they are running on and what containers should be running.

The command below will launch a single node etcd cluster listening on port 4001. docker run -d --name=etcd \ --net=host \ gcr.io/google_containers/etcd:2.2.1 \ /usr/local/bin/etcd \ --listen-client-urls=http://0.0.0.0:4001 \ --advertise-client-urls=http://0.0.0.0:4001 \ --data-dir=/var/etcd/data

The net=host means the container will share the same network as the host, removing the need to map ports.

In production you would want to run etcd on three separate machines to ensure maximum availability.

Creating Katacoda Scenarios

Thanks for creating Katacoda scenarios. This tab is designed to help you as an author have quick access the information you need when creating scenarios.

This tab will not be visible to users.

Here are some useful links to get you started.

Running Katacoda Workshops

If you are planning to use Katacoda for workshops, please contact [email protected] to arrange capacity.

Debugging Scenarios

Below is the response from any background scripts run or files uploaded. This stream can aid debugging scenarios.

If you still need assistance, please contact [email protected]