Unable to pull images using minikube in mac

196 views Asked by At

I'm using Minikube on macOS 13.5 and encountering the below error when attempting to create a deployment. I've configured Docker as the runtime container.

$kubectl get pod
NAME                          READY   STATUS             RESTARTS   AGE
nginx-depl-6b7698588c-2j7wt   0/1     ImagePullBackOff   0          6m51s

I followed a tutorial(https://medium.com/@javatechie/kubernetes-tutorial-install-run-minikube-in-mac-os-k8s-cluster-369b25b0c3f0) to set up Minikube and kubectl. When I inspect the pod, I encounter the following error:

Events:
  Type     Reason     Age                From               Message
  ----     ------     ----               ----               -------
  Normal   Scheduled  21s                default-scheduler  Successfully assigned default/nginx-depl-6b7698588c-2j7wt to minikube
  Warning  Failed     19s                kubelet            Failed to pull image "nginx": rpc error: code = Unknown desc = Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 192.xxx.xx.x:53: read udp 192.xxx.xx.x:54231->192.xxx.xx.x:53: read: connection refused
  Normal   BackOff    17s (x2 over 18s)  kubelet            Back-off pulling image "nginx"
  Warning  Failed     17s (x2 over 18s)  kubelet            Error: ImagePullBackOff
  Normal   Pulling    6s (x2 over 19s)   kubelet            Pulling image "nginx"
  Warning  Failed     6s (x2 over 19s)   kubelet            Error: ErrImagePull
  Warning  Failed     6s                 kubelet            Failed to pull image "nginx": rpc error: code = Unknown desc = Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 192.xxx.xx.x:53: read udp 192.xxx.xx.x:47743->192.xxx.xx.x:53: read: connection refused

By the way, proxy settings are turned off on my Mac. I am unable to ping from inside minikube.

$ minikube ssh
                         _             _
            _         _ ( )           ( )
  ___ ___  (_)  ___  (_)| |/')  _   _ | |_      __
/' _ ` _ `\| |/' _ `\| || , <  ( ) ( )| '_`\  /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )(  ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)

$ ping google.com
ping: bad address 'google.com'
$ cat /etc/resolv.conf
# This is /run/systemd/resolve/resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 192.168.64.1
search .
0

There are 0 answers