Environment:
Two virtual machines,
10.10.20.203 deploying Docker, ETCD, flannel, Kube-apiserver, Kube-controller-manager, Kube-scheduler
10.10.20.206 deploying Docker, Flannel, Kubelet, Kube-proxy
"Etcd"
1. Download Curl-l https://github.com/coreos/etcd/releases/download/v2.3.7/etcd-v2.3.7-linux-amd64.tar.gz-o Etcd-v2.3.7-linux-amd64.tar.gz
2. Copy Etcd and Etcdctl to/usr/bin
CP etcd/usr/bin/ETCDCP Etcdctl/usr/bin/etcdctl
3. Start command
ETCD----data-dir /var/lib/--listen-client-urls http://0.0.0.0:2379, http://0.0.0.0 : 4001 \--advertise-client-urls http://0.0.0.0:2379,http://0.0.0.0: 4001 \ 2>&1 &
4. Check the status
Etcdctl-c http://localhost:4001 cluster-health
Output the following information, representing the normal
Member CE2A822CEA30BFCA is Healthy:got healthy result from http://0.0.0.0:2379
Cluster is healthy
"K8s Deployment Readiness"
1, download the compiled k8s, file relatively large, 1.38G, as follows
Https://github.com/kubernetes/kubernetes/releases/download/v1.3.3/kubernetes.tar.gz
2, decompression/kubernetes/server/kubernetes-server-linux-amd64.tar.gz, will/kubernetes/server/kubernetes/server/ Copy the executable file from the bin directory to/usr/bin, using the following command
Find 755 Xargs CP {}/usr/bin
"Kube-apiserver"
kube---logtostderr=true --v=0--etcd-servers=http:// 10.10.20.203:4001 \--insecure-bind-address=0.0. 0.0 --insecure-port=8080--service-cluster-ip-range=10.254. 0.0/2>&1 &
"Kube-controller-manager"
kube-controller---logtostderr=true --v=0--master=http:// 10.10.20.203:8080 \2>&1 &
"Kube-scheduler"
kube---logtostderr=true --v=0--master=http:// 10.10.20.203:8080 \2>&1 &
"Kube-proxy"
kube---logtostderr=true --v=0--master=http://10.10.20.203:8080 \2>&1 &
"Kubelet"
--logtostderr=true --v=0--address=0.0. 0.0 --api-servers=http://10.10.20.203:8080 \--pod-infra-container-image= INDEX.TENXCLOUD.COM/GOOGLE_CONTAINERS/PAUSE-AMD64:3.02>&1 &
"Flannel"
1. Download Flannel https://github.com/coreos/flannel/releases/download/v0.5.5/flannel-0.5.5-linux-amd64.tar.gz
2. Decompression
3. Copy the Flanneld to the/usr/bin
CP Flanneld/usr/bin
4, configure the network (the server that installs the flannel needs to execute), after executing this instruction, will generate the/run/flannel/subnet.env file, when launches the Docker to need to use
Etcdctl-c http://10.10.20.203:4001 \'{"Network": "10.0.0.0/16"}'
"Docker"
Docker installation is not described, I was installed through Yum, because to specify the bridge used by Docker information, so the following command line to start
Source/run/flannel/subnet. Env -H UNIX:///var/run/docker.sock-h tcp://0.0.0.0:2375 \--bip=${flannel_subnet}--mtu= 10.10. 20.202 2>&1 &
"Killing Process"
Because it is started by the command line, it kills the process directly when it stops.
#杀dockerPS-ef |grepDocker |grep-Vgrep|awk '{print $}'|Xargs-I.Kill-9{} #杀etcdPS-ef |grepEtcd |grep-Vgrep|awk '{print $}'|Xargs-I.Kill-9{} #杀k8sPS-ef |grepKube |grep-Vgrep|awk '{print $}'|Xargs-I.Kill-9{} #杀flannelPS-ef |grepFlannel |grep-Vgrep|awk '{print $}'|Xargs-I.Kill-9{}
K8s Cluster deployment