run kubeadm init –config=kubeadm.yml –upload-certs | tee kubeadm-init.log command error: failed to pull image registry.aliyuncs.com/google_containers/coredns:v1.8.0
full error message as below:
kubeadm init --config=kubeadm.yml --upload-certs | tee kubeadm-init.log
[init] Using Kubernetes version: v1.21.2
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING Hostname]: hostname "node" could not be reached
[WARNING Hostname]: hostname "node": lookup node on 127.0.0.53:53: server misbehaving
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR ImagePull]: failed to pull image registry.aliyuncs.com/google_containers/coredns:v1.8.0: output: Error response from daemon: manifest for registry.aliyuncs.com/google_containers/coredns:v1.8.0 not found: manifest unknown: manifest unknown
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
Prompt to pull registry.aliyuncs.com/google_ Containers/coredns: v1.8.0 this image failed
use kubedm config images list — config kubedm.yml to query the image to be downloaded
kubeadm config images list --config kubeadm.yml
registry.aliyuncs.com/google_containers/kube-apiserver:v1.21.2
registry.aliyuncs.com/google_containers/kube-controller-manager:v1.21.2
registry.aliyuncs.com/google_containers/kube-scheduler:v1.21.2
registry.aliyuncs.com/google_containers/kube-proxy:v1.21.2
registry.aliyuncs.com/google_containers/pause:3.4.1
registry.aliyuncs.com/google_containers/etcd:3.4.13-0
registry.aliyuncs.com/google_containers/coredns:v1.8.0
Use the docker images command to query images
docker images
registry.aliyuncs.com/google_containers/kube-apiserver v1.21.2 106ff58d4308 3 weeks ago 126MB
registry.aliyuncs.com/google_containers/kube-controller-manager v1.21.2 ae24db9aa2cc 3 weeks ago 120MB
registry.aliyuncs.com/google_containers/kube-scheduler v1.21.2 f917b8c8f55b 3 weeks ago 50.6MB
registry.aliyuncs.com/google_containers/kube-proxy v1.21.2 a6ebd1c1ad98 3 weeks ago 131MB
registry.aliyuncs.com/google_containers/pause 3.4.1 0f8457a4c2ec 6 months ago 683kB
registry.aliyuncs.com/google_containers/etcd 3.4.13-0 0369cf4303ff 10 months ago 253MB
It is found that there is no registry.aliyuncs.com/google in the downloaded image_ Containers/coredns: v1.8.0
use the docker command to pull the image
docker pull registry.aliyuncs.com/google_containers/coredns:1.8.0
Kubernetes needs registry.aliyuncs.com/google_ Containers/coredns: v1.8.0, rename the image with the docker tag command
# rename
docker tag registry.aliyuncs.com/google_containers/coredns:1.8.0 registry.aliyuncs.com/google_containers/coredns:v1.8.0
# detele all mirror
docker rmi registry.aliyuncs.com/google_containers/coredns:1.8.0
Run the initialization command again
kubeadm init --config=kubeadm.yml --upload-certs | tee kubeadm-init.log
Prompt success
Your Kubernetes control-plane has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Follow the above prompts to configure kubectl
mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
# NOT ROOT
chown $(id -u):$(id -g) $HOME/.kube/config
Verify success
kubectl get node
# The ability to print out node information indicates success
NAME STATUS ROLES AGE VERSION
node NotReady control-plane,master 31m v1.21.2
Read More:
- The solution to the crash loop back off error of coredns in k8s deployment
- Docker pull Command Error response from daemon: Head https://registry-1.docker.io/v2/library/
- Failed to Initialize Error: error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR Port-6443]
- [Solved] Docker failed to delete image error: no such image: CentOS
- [Solved] Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to
- Login Error: token failed, reason: getaddrinfo EAI_AGAIN ks-apiserver (kubesphere is Installed)
- [Solved] Warning: detected “cgroupfs“ as the Docker cgroup driver. The recommended driver is “systemd“.
- Solve git upload file error [rejected] master -> master (fetch first) error: failed to push some refs to ‘
- How to Solve Docker delete container image error: Error response from daemon: conflict: unable to delete 7cc1942f1ed5 (must be forced)
- [Solved] Git Error: OpenSSL SSL_read: Connection was reset, errno 10054和Failed to connect to github.com port 443
- [Solved] Ubuntu Compile Rust Program Error: failed to run custom build command for openssl-sys v0.9.39
- Git pull error: Your local changes to the following files would be overwritten by me
- Push to origin/Master was rejected [How to Solve]
- Github Clone Failed SSL_ERROR_SYSCALL in connection to github.com:443
- [Solved] kubeadm join Cluster Error: error execution phase kubelet-start
- How to Download APK Files from Google Play Store
- [Solve] Yinhe Qilin V10 System Error: Failed to download metadata for repo ‘ks10-adv-os‘
- Solution of GIT pull code exception
- Ffmpeg: How to Solve error initializing filter ‘gltransition’
- Ansible Use yum module to install rpm Error: Request failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate v