Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registry.k8s.io/pause:3.6 does not use the address specified by --image-repository when executing kubeadm init #2851

Closed
Max-Qiu opened this issue Mar 29, 2023 · 11 comments
Labels
kind/support Categorizes issue or PR as a support question.

Comments

@Max-Qiu
Copy link

Max-Qiu commented Mar 29, 2023

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

What happened?

  1. use kubeadm init ...... --image-repository registry.aliyuncs.com/google_containers , it show :
    [wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory /etc/kubernetes/manifests". This can take up to 4m0s
    [kubelet-check] Initial timeout of 40s passed.
  2. then use systemctl status -l kubelet.service , it show :
    remote_runtime.go:176] "RunPodSandbox from runtime service failed" err="rpc error: code = Unknown desc = failed to get sandbox image "registry.k8s.io/pause:3.6": failed to pull image "registry.k8s.io/pause:3.6": failed to pull and unpack image "registry.k8s.io/pause:3.6": failed to resolve reference "registry.k8s.io/pause:3.6": failed to do request: Head "https://registry.k8s.io/v2/pause/manifests/3.6\": net/http: TLS handshake timeout"

What did you expect to happen?

I hope that registry.k8s.io/pause:3.6 will be downloaded through the address specified by --image-repository

How can we reproduce it (as minimally and precisely as possible)?

  1. Block registry.k8s.io
  2. Execute kubeadm init --control-plane-endpoint=192.168.220.101 --kubernetes-version v1.26.3 --pod-network-cidr=10.244.0.0/16 --image-repository registry.aliyuncs.com/google_containers

Anything else we need to know?

I need to execute the following code on each node to solve the problem

ctr -n k8s.io i pull registry.aliyuncs.com/google_containers/pause:3.6
ctr -n k8s.io i tag registry.aliyuncs.com/google_containers/pause:3.6 registry.k8s.io/pause:3.6

Kubernetes version

$ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.3", GitCommit:"9e644106593f3f4aa98f8a84b23db5fa378900bd", GitTreeState:"clean", BuildDate:"2023-03-15T13:40:17Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.3", GitCommit:"9e644106593f3f4aa98f8a84b23db5fa378900bd", GitTreeState:"clean", BuildDate:"2023-03-15T13:33:12Z", GoVersion:"go1.19.7", Compiler:"gc", Platform:"linux/amd64"}

OS version

$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

$ uname -a
Linux node1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
@pacoxu
Copy link
Member

pacoxu commented Mar 29, 2023

Check your containerd configuration.

@neolit123
Copy link
Member

see

https://kubernetes.io/docs/setup/production-environment/container-runtimes/#override-pause-image-containerd

/kind support

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Mar 29, 2023
@LxxxSec
Copy link

LxxxSec commented May 5, 2023

我也遇到了和你类似的问题,我的解决方案如下:

mkdir /etc/containerd
containerd config default > /etc/containerd/config.toml

接着编辑/etc/containerd/config.toml文件,把[plugins."io.containerd.grpc.v1.cri"]块下的sandbox_image值改为国内镜像即可,如下方代码所示(pause版本因人而异):

sandbox_image = "registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6"

接着重启服务,重新init即可:

systemctl restart containerd.service

@luyajin
Copy link

luyajin commented Jul 24, 2023

我修改了这个配置怎么一直都不生效呢

@luyajin
Copy link

luyajin commented Jul 24, 2023

sandbox_image = "registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6"

@linonetwo
Copy link

Is this a bug? i'm using docker, not containerd , how to fix it on user side?

@chendave
Copy link
Member

Is this a bug? i'm using docker, not containerd , how to fix it on user side?

this is not a bug, it's just a matter of configuration, shouldn't docker use containerd as the runtime by default?

@neolit123
Copy link
Member

Is this a bug? i'm using docker, not containerd , how to fix it on user side?

k8s maintainers recommend to move to containerd or cri-o.
docker (via cri-dockerd) is no longer well supported.

@kingwingfly
Copy link

systemctl restart containerd.service

义父!!!!!!!!!!!!!!!!!

@zhkmxx9302013
Copy link

我也遇到了和你类似的问题,我的解决方案如下:

mkdir /etc/containerd
containerd config default > /etc/containerd/config.toml

接着编辑/etc/containerd/config.toml文件,把[plugins."io.containerd.grpc.v1.cri"]块下的sandbox_image值改为国内镜像即可,如下方代码所示(pause版本因人而异):

sandbox_image = "registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6"

接着重启服务,重新init即可:

systemctl restart containerd.service

困扰了半个月...换了一堆源,原来在这里。。

@jiangxiaoqiang
Copy link

我也遇到了和你类似的问题,我的解决方案如下:

mkdir /etc/containerd
containerd config default > /etc/containerd/config.toml

接着编辑/etc/containerd/config.toml文件,把[plugins."io.containerd.grpc.v1.cri"]块下的sandbox_image值改为国内镜像即可,如下方代码所示(pause版本因人而异):

sandbox_image = "registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.6"

接着重启服务,重新init即可:

systemctl restart containerd.service

我也是这个问题,不过是在集群运行过程中无法拉取。修改了配置不生效不知道是什么原因。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests