请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

关于ingress-nginx镜像的存放路径

我在安装ingress-nginx的时候手动docker pull了如下三个镜像

[root@node-1 ingress-nginx]# grep image deploy.yaml 
        image: registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:v1.2.1@sha256:5516d103a9c2ecc4f026efbd4b40662ce22dc1f824fb129ed121460aaa5c47f8
        imagePullPolicy: IfNotPresent
        image: registry.cn-hangzhou.aliyuncs.com/google_containers/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660
        imagePullPolicy: IfNotPresent
        image: registry.cn-hangzhou.aliyuncs.com/google_containers/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660
        imagePullPolicy: IfNotPresent

但是在apply的时候POD依旧处于pending状态
这是因为ingress-nginx无法找到镜像文件吗?镜像应该存放在哪个路径下呢?


问题补充:

[root@node-1 ingress-nginx]# kubectl get all -n ingress-nginx
NAME                                            READY   STATUS              RESTARTS   AGE
pod/ingress-nginx-admission-create-86b5h        1/1     Running             2          93s
pod/ingress-nginx-admission-patch-2zz4b         1/1     Running             3          93s
pod/ingress-nginx-controller-7f7d876674-npcfq   0/1     ContainerCreating   0          93s

NAME                                         TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/ingress-nginx-controller             LoadBalancer   10.233.255.208   <pending>     80:32308/TCP,443:31947/TCP   93s
service/ingress-nginx-controller-admission   ClusterIP      10.233.75.128    <none>        443/TCP                      93s

NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/ingress-nginx-controller   0/1     1            0           93s

NAME                                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/ingress-nginx-controller-7f7d876674   1         1         0       93s

NAME                                       COMPLETIONS   DURATION   AGE
job.batch/ingress-nginx-admission-create   0/1           93s        93s
job.batch/ingress-nginx-admission-patch    0/1           93s        93s

create和patch先同时running了一阵子后,相继进入Error状态并重启
controller则一直处于ContainerCreating状态,并报错:MountVolume.SetUp failed for volume “webhook-cert” : secret “ingress-nginx-admission” not found

正在回答 回答被采纳积分+3

1回答

刘果国 2022-07-14 09:35:43

确认下kubelet是否使用了docker,如果是containerd的话,用docker pull的它是识别不到的,要用crictl

0 回复 有任何疑惑可以回复我~
  • 另外pending状态需要describe看看具体原因,不一定就是镜像拉不到
    回复 有任何疑惑可以回复我~ 2022-07-14 09:36:23
  • 提问者 慕圣334217 回复 刘果国 #2
    是的,看到了pod描述中包含了
    MountVolume.SetUp failed for volume "webhook-cert" : secret "ingress-nginx-admission" not found
    回复 有任何疑惑可以回复我~ 2022-07-14 20:00:45
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信