安装k8s 1.19.0和kube-ovn
参考博客—安装与重装k8s 1.15.0
1. 安装k8s 1.19.0软件包
# 查看k8s版本对应的镜像
kubeadm config images list --kubernetes-version [version]
yum install -y kubelet-1.19.0 kubeadm-1.19.0 kubectl-1.19.0
images=(kube-apiserver:v1.19.0 kube-controller-manager:v1.19.0 kube-scheduler:v1.19.0
etcd:3.4.9-1 coredns:1.7.0 pause:3.2 kube-proxy:v1.19.0)
for imageName in ${images[@]} ; do
docker pull registry.aliyuncs.com/google_containers/$imageName
docker tag registry.aliyuncs.com/google_containers/$imageName k8s.gcr.io/$imageName
docker rmi registry.aliyuncs.com/google_containers/$imageName
done
2. 修改kubeadm.yaml
3. 初始化k8s集群
kubeadm init --config kubeadm.yaml
4. 安装kube-ovn
wget https://raw.githubusercontent.com/kubeovn/kube-ovn/release-1.10/dist/images/install.sh
vim install.sh
bash install.sh