인프런 커뮤니티 질문&답변

남태규님의 프로필 이미지
남태규

작성한 질문수

초보를 위한 쿠버네티스 안내서

시작하기

ImagePullBackOff 오류가 발생합니다.

작성

·

3.6K

1

답변 6

1

남태규님의 프로필 이미지
남태규
질문자

드라이버는 hyper-v를 사용하고 있습니다.

λ minikube start --insecure-registry="0.0.0.0/0"

�  Microsoft Windows 10 Pro 10.0.19042 Build 19042 위의 minikube v1.16.0

✨  자동적으로 hyperv 드라이버가 선택되었습니다

�  Starting control plane node minikube in cluster minikube

�  hyperv VM (CPUs=2, Memory=4000MB, Disk=20000MB) 를 생성하는 중 ...

❗  This VM is having trouble accessing https://k8s.gcr.io

�  To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/

�  쿠버네티스 v1.20.0 을 Docker 20.10.0 런타임으로 설치하는 중

    ▪ Generating certificates and keys ...

    ▪ Booting up control plane ...

    ▪ Configuring RBAC rules ...

�  Verifying Kubernetes components...

�  Enabled addons: storage-provisioner, default-storageclass

�  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

0

subicura님의 프로필 이미지
subicura
지식공유자

안녕하세요! 인증서 이슈를 재현하기 어려워 답변이 늦었습니다 ㅠ

명령어를 변경하고 다시 테스트 부탁드립니다.

minikube start --insecure-registry=production.cloudflare.docker.com:443,docker.io:443

설정이 정상적으로 되었는지 확인하려면 minikube ssh 로 콘솔 접근 후 다음 명령어로 확인할 수 있습니다.

cat /usr/lib/systemd/system/docker.service

ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --default-ulimit=nofile=1048576:1048576 --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=hyperkit --insecure-registry 10.96.0.0/12 --insecure-registry production.cloudflare.docker.com:443 --insecure-registry docker.io:443

동일하게 오류가 발생한다면 기본 이미지 경로를 변경해보시겠어요?

mysql:5.6 -> docker.io/library/mysql:5.6

wordpress:5.5.3-apache -> docker.io/library/wordpress:5.5.3-apache

0

subicura님의 프로필 이미지
subicura
지식공유자

minikube delete 하시고 옵션을 추가하고 새로 만들어도 동일한 메시지가 나오시나요?

minikube start --insecure-registry="0.0.0.0/0"

minikube 실행시 driver가 무엇이였는지 알 수 있을까요? docker 드라이버를 사용하셨다면 현재 docker for desktop 설정을 변경해야 할 것 같습니다.

docker engine 설정에서 insecure-registry 설정을 추가해보시겠어요?

{

    "insecure-registries": ["0.0.0.0/0"]

}

0

남태규님의 프로필 이미지
남태규
질문자

동일한 오류가 계속 발생하는데 다른 방법은 없을까요? 사무실 노트북에서 교육 수강 중이라 다른 네트워크 환경으로는 쉽지 않은 상황입니다.

λ kubectl describe po

Name:         wordpress-5f59577d4d-l9nm8

Namespace:    default

Priority:     0

Node:         minikube/172.29.200.203

Start Time:   Tue, 26 Jan 2021 10:11:28 +0900

Labels:       app=wordpress

              pod-template-hash=5f59577d4d

              tier=frontend

Annotations:  <none>

Status:       Pending

IP:           172.17.0.4

IPs:

  IP:           172.17.0.4

Controlled By:  ReplicaSet/wordpress-5f59577d4d

Containers:

  wordpress:

    Container ID:

    Image:          wordpress:5.5.3-apache

    Image ID:

    Port:           80/TCP

    Host Port:      0/TCP

    State:          Waiting

      Reason:       ImagePullBackOff

    Ready:          False

    Restart Count:  0

    Environment:

      WORDPRESS_DB_HOST:      wordpress-mysql

      WORDPRESS_DB_PASSWORD:  password

    Mounts:

      /var/run/secrets/kubernetes.io/serviceaccount from default-token-qrbj5 (ro)

Conditions:

  Type              Status

  Initialized       True

  Ready             False

  ContainersReady   False

  PodScheduled      True

Volumes:

  default-token-qrbj5:

    Type:        Secret (a volume populated by a Secret)

    SecretName:  default-token-qrbj5

    Optional:    false

QoS Class:       BestEffort

Node-Selectors:  <none>

Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s

                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s

Events:

  Type     Reason     Age                     From               Message

  ----     ------     ----                    ----               -------

  Normal   Scheduled  7m51s                   default-scheduler  Successfully assigned default/wordpress-5f59577d4d-l9nm8 to minikube

  Warning  Failed     7m35s                   kubelet            Failed to pull image "wordpress:5.5.3-apache": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/0d/0d35c2300ec845fda141ba012f7c6dccde8f0ae106b8f4bb0fcfced69380f851/data?verify=1611626504-DY7I4hl3jqoR5v9HHqPZ%2Bg62Rtc%3D: x509: certificate signed by unknown authority

  Warning  Failed     7m14s                   kubelet            Failed to pull image "wordpress:5.5.3-apache": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/0d/0d35c2300ec845fda141ba012f7c6dccde8f0ae106b8f4bb0fcfced69380f851/data?verify=1611626525-wvDSn0woAORL9xUyBDARmHbUPVE%3D: x509: certificate signed by unknown authority

  Warning  Failed     6m38s                   kubelet            Failed to pull image "wordpress:5.5.3-apache": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/0d/0d35c2300ec845fda141ba012f7c6dccde8f0ae106b8f4bb0fcfced69380f851/data?verify=1611626561-NbpYr9ZHlt3N5GIQpP3gplL7%2BcU%3D: x509: certificate signed by unknown authority

  Normal   Pulling    5m57s (x4 over 7m50s)   kubelet            Pulling image "wordpress:5.5.3-apache"

  Warning  Failed     5m47s (x4 over 7m35s)   kubelet            Error: ErrImagePull

  Warning  Failed     5m47s                   kubelet            Failed to pull image "wordpress:5.5.3-apache": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/0d/0d35c2300ec845fda141ba012f7c6dccde8f0ae106b8f4bb0fcfced69380f851/data?verify=1611626612-IhIiHSyRB9V8c8qW7WDW7SMApAA%3D: x509: certificate signed by unknown authority

  Normal   BackOff    5m20s (x6 over 7m34s)   kubelet            Back-off pulling image "wordpress:5.5.3-apache"

  Warning  Failed     2m38s (x16 over 7m34s)  kubelet            Error: ImagePullBackOff

Name:         wordpress-mysql-545d9c6dc-2jl2j

Namespace:    default

Priority:     0

Node:         minikube/172.29.200.203

Start Time:   Tue, 26 Jan 2021 10:11:28 +0900

Labels:       app=wordpress

              pod-template-hash=545d9c6dc

              tier=mysql

Annotations:  <none>

Status:       Pending

IP:           172.17.0.3

IPs:

  IP:           172.17.0.3

Controlled By:  ReplicaSet/wordpress-mysql-545d9c6dc

Containers:

  mysql:

    Container ID:

    Image:          mysql:5.6

    Image ID:

    Port:           3306/TCP

    Host Port:      0/TCP

    State:          Waiting

      Reason:       ImagePullBackOff

    Ready:          False

    Restart Count:  0

    Environment:

      MYSQL_ROOT_PASSWORD:  password

    Mounts:

      /var/run/secrets/kubernetes.io/serviceaccount from default-token-qrbj5 (ro)

Conditions:

  Type              Status

  Initialized       True

  Ready             False

  ContainersReady   False

  PodScheduled      True

Volumes:

  default-token-qrbj5:

    Type:        Secret (a volume populated by a Secret)

    SecretName:  default-token-qrbj5

    Optional:    false

QoS Class:       BestEffort

Node-Selectors:  <none>

Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s

                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s

Events:

  Type     Reason     Age                     From               Message

  ----     ------     ----                    ----               -------

  Normal   Scheduled  7m51s                   default-scheduler  Successfully assigned default/wordpress-mysql-545d9c6dc-2jl2j to minikube

  Warning  Failed     7m41s                   kubelet            Failed to pull image "mysql:5.6": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/eb/eb4e842271a48c377b57f2a39ca3f5c62f659011f0032eaf124457233cc84314/data?verify=1611626498-cxfr9p0YWveVFYGZAMng9W%2Byrpk%3D: x509: certificate signed by unknown authority

  Warning  Failed     7m21s                   kubelet            Failed to pull image "mysql:5.6": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/eb/eb4e842271a48c377b57f2a39ca3f5c62f659011f0032eaf124457233cc84314/data?verify=1611626518-kAs68n%2BQArDWypn6o4%2BrYRSpynM%3D: x509: certificate signed by unknown authority

  Warning  Failed     6m51s                   kubelet            Failed to pull image "mysql:5.6": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/eb/eb4e842271a48c377b57f2a39ca3f5c62f659011f0032eaf124457233cc84314/data?verify=1611626548-XqjEDWg62rIV8XIYCYUgPWivOo8%3D: x509: certificate signed by unknown authority

  Normal   Pulling    6m (x4 over 7m50s)      kubelet            Pulling image "mysql:5.6"

  Warning  Failed     5m54s (x4 over 7m41s)   kubelet            Error: ErrImagePull

  Warning  Failed     5m54s                   kubelet            Failed to pull image "mysql:5.6": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/eb/eb4e842271a48c377b57f2a39ca3f5c62f659011f0032eaf124457233cc84314/data?verify=1611626605-o41JwXM9opv1M2decSpuGTnR%2Bgo%3D: x509: certificate signed by unknown authority

  Normal   BackOff    5m39s (x6 over 7m40s)   kubelet            Back-off pulling image "mysql:5.6"

  Warning  Failed     2m43s (x18 over 7m40s)  kubelet            Error: ImagePullBackOff

NAM@DESKTOP-F3P6LSN /c/Temp/guide/index

0

subicura님의 프로필 이미지
subicura
지식공유자

안녕하세요! 상세한 로그 감사합니다. 로그 상으로 봤을때 도커 이미지를 다운받는데 실패하여 ImagePullBackOff 에러가 발생한 것으로 보입니다.

테스트하고 계신 환경의 네트워크가 사설인증서가 필요한 것으로 보입니다. 다른 네트워크 망에서 테스트하시거나 minikube를 생성할때 --insecure-registry 옵션을 이용해보시겠어요?

minikube start --insecure-registry="0.0.0.0/0"

0

남태규님의 프로필 이미지
남태규
질문자

Events:

  Type     Reason     Age                  From               Message

  ----     ------     ----                 ----               -------

  Normal   Scheduled  3m24s                default-scheduler  Successfully assigned default/wordpress-5f59577d4d-mfvdj to minikube

  Warning  Failed     3m9s                 kubelet            Failed to pull image "wordpress:5.5.3-apache": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/0d/0d35c2300ec845fda141ba012f7c6dccde8f0ae106b8f4bb0fcfced69380f851/data?verify=1611562023-EEtLSw79Y%2FDqonD7esCGJPkaZUw%3D: x509: certificate signed by unknown authority

  Warning  Failed     2m50s                kubelet            Failed to pull image "wordpress:5.5.3-apache": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/0d/0d35c2300ec845fda141ba012f7c6dccde8f0ae106b8f4bb0fcfced69380f851/data?verify=1611562042-hKDq0BUKSOD2VmKlyodjmpI5wus%3D: x509: certificate signed by unknown authority

  Warning  Failed     2m14s                kubelet            Failed to pull image "wordpress:5.5.3-apache": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/0d/0d35c2300ec845fda141ba012f7c6dccde8f0ae106b8f4bb0fcfced69380f851/data?verify=1611562077-aYupBM4FUOa1OLSwjfE%2B5IiId7Y%3D: x509: certificate signed by unknown authority

  Normal   Pulling    84s (x4 over 3m23s)  kubelet            Pulling image "wordpress:5.5.3-apache"

  Warning  Failed     78s (x4 over 3m9s)   kubelet            Error: ErrImagePull

  Warning  Failed     78s                  kubelet            Failed to pull image "wordpress:5.5.3-apache": rpc error: code = Unknown desc = error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/0d/0d35c2300ec845fda141ba012f7c6dccde8f0ae106b8f4bb0fcfced69380f851/data?verify=1611562134-2mcUL1sEwqGJE%2FRhT53GOLqQwl8%3D: x509: certificate signed by unknown authority

  Normal   BackOff    65s (x6 over 3m9s)   kubelet            Back-off pulling image "wordpress:5.5.3-apache"

  Warning  Failed     51s (x7 over 3m9s)   kubelet            Error: ImagePullBackOff

남태규님의 프로필 이미지
남태규

작성한 질문수

질문하기