If you are using a released version of Kubernetes, you should refer to the docs that go with that version.
The latest release of this document can be found [here](http://releases.k8s.io/release-1.1/docs/getting-started-guides/docker-multinode.md).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.
Note: There is a bug in Docker 1.7.0 that prevents this from working correctly. Please install Docker 1.6.2 or Docker 1.7.1.
Table of Contents
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
flanneld
and etcd
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.
You can specify k8s version on very node before install:
export K8S_VERSION=<your_k8s_version (e.g. 1.0.3)>
Otherwise, we'll use latest hyperkube
image as default k8s version.
The first step in the process is to initialize the master node.
Clone the Kubernetes repo, and run master.sh on the master machine with root:
$ export MASTER_IP=<your_master_ip (e.g. 1.2.3.4)>
$ cd kubernetes/docs/getting-started-guides/docker-multinode/
$ ./master.sh
Master done!
See here for detailed instructions explanation.
Once your master is up and running you can add one or more workers on different machines.
Clone the Kubernetes repo, and run worker.sh on the worker machine with root:
$ export MASTER_IP=<your_master_ip (e.g. 1.2.3.4)>
$ cd kubernetes/docs/getting-started-guides/docker-multinode/
$ ./worker.sh
Worker done!
See here for detailed instructions explanation.
See here for instructions.
Once your cluster has been created you can test it out
For more complete applications, please look in the examples directory
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。