Planning Nodes
Install ubuntu 14.04 LTS
Prepare password-less SSH login
Establish Ssh-key certificate, switch to root account, use command ssh-keygen-t RSA
Generating public/private RSA key pair.
Enter file in which to save the key (/ROOT/.SSH/ID_RSA):
Enter passphrase (empty for no passphrase):
Enter same Passphrase again:
Your identification has been saved In/root/.ssh/id_rsa.
Your public key has been saved in/root/.ssh/id_rsa.pub.
Distribute Id_rsa.pub to authorized_keys inside The root directory of all nodes
Cat/root/.ssh/id_rsa.pub >>/root/.ssh/authorized_keys
or use the Ssh-copy-id command, such as Ssh-copy-id-i/root/.ssh/id_rsa.pub node_ip
Installing, configuring k8s
Download Kubernetes 1.4 official version, address https://github.com/kubernetes/kubernetes/releases/download/v1.4.0/kubernetes.tar.gz
Unzip Kubernetes to/opt/kubernetes
Because the k8s v1.4.0 release does not have a saltbase package, it downloads saltbase content to GitHub, copies it to the/opt/kubernetes/cluster directory, and Saltbase/salt/genera Te-cert/make-ca-cert.sh is set to executable.
Adjust the ubuntu/config-default.conf configuration,
Export nodes=${nodes:-"[email protected]"} modified to node list, node list [email protected] [email protected [email protected] [email protected] separated by a space
roles=${roles:-"AI"} modifies the corresponding rolein the order of the nodes, a means master,i means node, ai means that both Master and node areseparated by spaces
Export Num_nodes=${num_nodes:-1} modified to the number of node lists
under the cluster directory, run the command kubernetes_provider=ubuntu/kube-up.sh start k8s cluster;
Kubernetes_provider=ubuntu./kube-down.sh Stop k8s Cluster
Note:
Run Command Debug=true kubernetes_provider=ubuntu./kube-up.sh Start Debug mode, start the cluster
Reference
Http://containertutorials.com/get_started_kubernetes/index.html#installation
Kubernetes Ubuntu Deployment