一、部署go环境
wget https://studygolang.com/dl/golang/go1.13.4.linux-amd64.tar.gz
vi /etc/profile
export PATH=$PATH:/usr/local/go/bin
source /etc/profile
二、替换kubeadm文件更新证书
1、下载kubernetes源码包
wget https://codeload.github.com/kubernetes/kubernetes/tar.gz/v1.17.0
2、更改kubeadm证书过期时间
vim cmd/kubeadm/app/util/pkiutil/pki_helpers.go
3、编译kubeadm
make WHAT=cmd/kubeadm GOFLAGS=-v
4、替换kubeadm文件
cp /usr/bin/kubeadm /usr/bin/kubeadm.old
cp _output/bin/kubeadm /usr/bin/kubeadm
5、查看当前证书过期时间
kubeadm alpha certs check-expiration
6、更新证书过期时间
cp -r /etc/kubernetes/pki /etc/kubernetes/pki.old
kubeadm alpha certs renew all