Because the project needs to use Kubernetes To change the bottom of Docker, So while writing and completing the task at the same time continue to learn Kubernetes
Some of the existing documents and Kubernetes The Chinese documents of the Chinese community do not have a very detailed tutorial on the initial installation and deployment environment , Therefore, it is suggested to go directly to the official website to see the documents , Of course, the official website is all in English .
Official document :https://kubernetes.io/
Official document installation :https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
The installation environment is Ubuntu
All commands for the installation process :
apt-get update && apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl
1. Update the source and download the tool
apt-get update && apt-get install -y apt-transport-https curl
2. Add public key
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
If Linux The network is not accessible , Error will be reported at this time
Click on this link https://packages.cloud.google.com/apt/doc/apt-key.gpg ( Non domestic resources ) obtain pgp file , then
adopt apt-key add apt-key.gpg To load the . Unable to download from the network disk .
SkyDrive address : link :https://pan.baidu.com/s/1aHtwOveSt0-QLPw9SYS8xw
Extraction code :uqjf
3. add to kubernetes Source
Official source ( Non national endogenous )
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
Domestic sources
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://mirrors.ustc.edu.cn/kubernetes/apt kubernetes-xenial main
EOF
Update the source again
apt-get update
4. Install the latest kubelet、kubeadm、kubectl
apt-get install -y kubelet kubeadm kubectl
If you want to install the specified version , Check out the version first :
apt-cache madison kubeadm kubelet kubectl
Install the specified version
apt-get install -y kubelet=1.15.1-00 kubeadm=1.15.1-00 kubectl=1.15.1-00
5. Settings are not updated with system updates
apt-mark hold kubelet kubeadm kubectl