Original link: k8s installation - ubuntu_ubuntu installs k8s_Liu Xia_'s Blog-CSDN Blog
kubeadm heat
install docker2
Pull the corresponding image according to the result of kubeadm config images list
Domestic warehouse address 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
The image pulled back is from a domestic source, so it needs to be changed to a tag that kubeadm can recognize (the tag in the above picture)
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.23.17 k8s.gcr.io/kube-apiserver:v1.23.17
docker tag registry.aliyuncs.com/google_containers/kube-controller-manager:v1.23.17 k8s.gcr.io/kube-controller-manager:v1.23.17
docker tag registry.aliyuncs.com/google_containers/kube-scheduler:v1.23.17 k8s.gcr.io/kube-scheduler:v1.23.17
docker tag registry.aliyuncs.com/google_containers/kube-proxy:v1.23.17 k8s.gcr.io/kube-proxy:v1.23.17
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6 k8s.gcr.io/pause:3.6
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.1-0 k8s.gcr.io/etcd:3.5.1-0
docker tag registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:v1.8.6 k8s.gcr.io/coredns/coredns:v1.8.6
[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