Note: These instructions are somewhat significantly more advanced than the single node instructions. If you are interested in just starting to explore Kubernetes, we recommend that you start there.
This guide will set up a 2-node kubernetes cluster, consisting of a master node which hosts the API server and orchestrates work and a worker node which receives work from the master. You can repeat the process of adding worker nodes an arbitrary number of times to create larger clusters.
Here's a diagram of what the final result will look like:
This guide also uses a pattern of running two instances of the Docker daemon
- A bootstrap Docker instance which is used to start system daemons like
flanneld
andetcd
- A main Docker instance which is used for the Kubernetes infrastructure and user's scheduled containers
This pattern is necessary because the flannel
daemon is responsible for setting up and managing the network that interconnects
all of the Docker containers created by Kubernetes. To achieve this, it must run outside of the main Docker daemon. However,
it is still useful to use containers for deployment and management, so we create a simpler bootstrap daemon to achieve this.
The first step in the process is to initialize the master node.
See here for detailed instructions.
Once your master is up and running you can add one or more workers on different machines.
See here for detailed instructions.
Once your cluster has been created you can test it out
For more complete applications, please look in the examples directory