Skip to content

Latest commit

 

History

History
133 lines (106 loc) · 4.19 KB

README0.2.md

File metadata and controls

133 lines (106 loc) · 4.19 KB

One click fast installation of highly available kubernetes cluster, as well as addition of kubernetes node, deletion of kubernetes node, destruction of kubernetes master and rebuild of kubernetes master in later operation and maintenance stage.

avatar


[1] Corresponding relation:

Kube-install and kubernetes version correspondence:
kube-install VersionCorresponding RelationKubernetes 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 

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.2.2/kube-install-pkg-1.14.tgz
# tar -zxvf kube-install-pkg-1.14.tgz

2.3 Initialization
Perform pre installation initialization
# cd /root/kube-install/
# ./kube-install -opt init

2.4 Install k8s cluster
If your server environment is as follows:
IP AddressRoleOS VersionRoot Password
192.168.1.11k8s-master,k8s-nodeCentOS Linux release 7cloudnativer
192.168.1.12k8s-master,k8s-nodeCentOS Linux release 7cloudnativer
192.168.1.13k8s-master,k8s-nodeCentOS Linux release 7cloudnativer
192.168.1.14k8s-nodeCentOS Linux release 7cloudnativer
192.168.1.15k8s-nodeCentOS Linux release 7cloudnativer
192.168.1.16k8s-nodeCentOS Linux release 7cloudnativer
Well,Execute on the k8s-master selected above:
# cd /root/kube-install/
# ./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.88" -sshpwd "cloudnativer"

Note: in the above command, the "-mastervip" parameter is the k8s cluster virtual IP address.


2.5 Login k8s dashboard console UI
Execute the following command on the k8s-master you selected to view the k8s dashboard console URL and key:

# cat /opt/kube-install/loginkey.txt

avatar

Login to the k8s dashboard console UI using the URL and key in the /opt/kube-install/loginkey.txt document.Here are the relevant screenshots:

avatar

avatar




[3] Operation and maintenance:

After kube-install is installed, you can directly execute "kube-install" command in any directory of any k8s-master server.

3.1 Delete k8s-node from k8s cluster
Select any k8s-mkaster server, and execute the following command on it:
# kube-install -opt delnode -node "192.168.1.13,192.168.1.15" -sshpwd "cloudnativer"

3.2 Add k8s-node to k8s cluster
Select any k8s-mkaster server, and execute the following command on it:
# kube-install -opt addnode -node "192.168.1.15,192.168.1.16" -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 delmaster -master "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.