原文链接:k8s安装——ubuntu_ubuntu安装k8s_流夏_的博客-CSDN博客
kubeadm init
安装docker2
按照 kubeadm config images list的结果去拉取对应的镜像
国内仓库地址registry.cn-hangzhou.aliyuncs.com/google_containers/
root@zkys:/home/k8s_yaml_install# kubeadm config images list
I0714 09:22:09.392180 168671 version.go:255] remote version is much newer: v1.27.3; falling back to: stable-1.23
k8s.gcr.io/kube-apiserver:v1.23.17
k8s.gcr.io/kube-controller-manager:v1.23.17
k8s.gcr.io/kube-scheduler:v1.23.17
k8s.gcr.io/kube-proxy:v1.23.17
k8s.gcr.io/pause:3.6
k8s.gcr.io/etcd:3.5.1-0
k8s.gcr.io/coredns/coredns:v1.8.6
拉回来的镜像是国内源,所以要改成kubeadm能识别的tag(上图中的tag)
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.23.17 k8s.gcr.io/kube-apiserver:v1.23.17docker tag registry.aliyuncs.com/google_containers/kube-controller-manager:v1.23.17 k8s.gcr.io/kube-controller-manager:v1.23.17docker tag registry.aliyuncs.com/google_containers/kube-scheduler:v1.23.17 k8s.gcr.io/kube-scheduler:v1.23.17docker tag registry.aliyuncs.com/google_containers/kube-proxy:v1.23.17 k8s.gcr.io/kube-proxy:v1.23.17docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6 k8s.gcr.io/pause:3.6docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.1-0 k8s.gcr.io/etcd:3.5.1-0docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:v1.8.6 k8s.gcr.io/coredns/coredns:v1.8.6
使用kubeadm搭建k8s生产环境集群v1.23.1_kubeadm能用于生产吗_江户茶家的浅风的博客-CSDN博客
[root@master ~]# kubeadm init --kubernetes-version=1.23.1 --apiserver-advertise-address=192.168.13.124 --image-repository registry.cn-hangzhou.aliyuncs.com/google_containers --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=SystemVerification