This is a one click rapid deployment tool for highly available kubernetes clusters.
[1] Corresponding relation:
Kube-install and kubernetes version correspondence:
kube-install Version | Corresponding Relation | Kubernetes Version |
v0.1.* v0.2.* | -----> | v1.14.* |
v0.3.* | -----> | v1.14* v1.18.* |
[2] How to install?
2.1 Download kube-install file
Select a k8s-master and execute:
# cd /root/ # git clone https://github.com/cloudnativer/kube-install.git # cd /root/kube-install/ |
2.2 Download the kube-install-pkg-1.14.tgz package from this link https://github.com/cloudnativer/kube-install/releases
# cd /root/kube-install/ # wget https://github.com/cloudnativer/kube-install/releases/download/v0.1.0/kube-install-pkg-1.14.tgz # tar -zxvf kube-install-pkg-1.14.tgz |
2.3 Initialization
Perform pre installation initialization
# ./kube-install -opt init |
2.4 Install k8s cluster
If your server environment is as follows:
IP Address | Role | OS Version | Root Password |
192.168.1.11 | k8s-master,k8s-node | CentOS Linux release 7 | cloudnativer |
192.168.1.12 | k8s-master,k8s-node | CentOS Linux release 7 | cloudnativer |
192.168.1.13 | k8s-master,k8s-node | CentOS Linux release 7 | cloudnativer |
192.168.1.14 | k8s-node | CentOS Linux release 7 | cloudnativer |
192.168.1.15 | k8s-node | CentOS Linux release 7 | cloudnativer |
192.168.1.16 | k8s-node | CentOS Linux release 7 | cloudnativer |
# ./kube-install -opt install -master "192.168.1.11,192.168.1.12,192.168.1.13" -node "192.168.1.11,192.168.1.12,192.168.1.13,192.168.1.14" -mastervip "192.168.1.100" -sshpwd "cloudnativer" |
[3] Operation and maintenance:
3.1 Add k8s-node to k8s cluster
Select any k8s-mkaster server, and execute the following command on it:
# kube-install -opt addnode -addnode "192.168.1.15,192.168.1.16" -sshpwd "cloudnativer" |
3.2 Delete k8s-node from k8s cluster
Select any k8s-mkaster server, and execute the following command on it:
# kube-install -opt delnode -delnode "192.168.1.13,192.168.1.15" -sshpwd "cloudnativer" |
3.3 Delete k8s-master from k8s cluster
Select any k8s-mkaster server, and execute the following command on it:
# kube-install -opt delnode -delnode "192.168.1.13,192.168.1.15" -sshpwd "cloudnativer" |
3.4 Rebuild k8s-master to k8s cluster
Select any k8s-mkaster server, and execute the following command on it:
# kube-install -opt rebuildmaster -rebuildmaster "192.168.1.13" -sshpwd "cloudnativer" |
[4] Parameter introduction:
The parameters about kube-install can be viewed using the "kube-install --help" command. You can also see more detailed parameter introduction here.