kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.5k stars 4.89k forks source link

v1.33.1 - Apple M3 - DNS issue: failed to resolve reference / connection refused #19412

Open linux-dancer opened 3 months ago

linux-dancer commented 3 months ago

What Happened?

After the successful start of minikube on an Apple M3, I'm unable to start running any pod.

Start a fresh new cluster

Delete any possible previous configuration: minikube delete --all --purge

Start a new cluster with qemu2 driver, socket_vmnet network and containerd runtime

minikube start --container-runtime=containerd

πŸ˜„  minikube v1.33.1 on Darwin 14.6.1 (arm64)
✨  Automatically selected the qemu2 driver
🌐  Automatically selected the socket_vmnet network
πŸ’Ώ  Downloading VM boot image ...
    > minikube-v1.33.1-arm64.iso....:  65 B / 65 B [---------] 100.00% ? p/s 0s
    > minikube-v1.33.1-arm64.iso:  361.99 MiB / 361.99 MiB  100.00% 34.07 MiB p
πŸ‘  Starting "minikube" primary control-plane node in "minikube" cluster
πŸ’Ύ  Downloading Kubernetes v1.30.0 preload ...
    > preloaded-images-k8s-v18-v1...:  349.76 MiB / 349.76 MiB  100.00% 30.63 M
πŸ”₯  Creating qemu2 VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
❗  This VM is having trouble accessing https://registry.k8s.io
πŸ’‘  To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
πŸ“¦  Preparing Kubernetes v1.30.0 on containerd 1.7.15 ...
    β–ͺ Generating certificates and keys ...
    β–ͺ Booting up control plane ...
    β–ͺ Configuring RBAC rules ...
πŸ”—  Configuring bridge CNI (Container Networking Interface) ...
πŸ”Ž  Verifying Kubernetes components...
    β–ͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
πŸ„  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

run a nginx pod

kubectl run nginx --image nginx

Failed to pull image "nginx": failed to pull and unpack image "docker.io/library/nginx:latest": failed to resolve reference "docker.io/library/nginx:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/latest": dial tcp 3.219.239.5:443: connect: connection refused

The error suggests that it's a DNS issue

Check DNS settings within minikube.

I'm able to query both quay.io and docker.io from the minikube container (minikube ssh)

query docker.io (no issues)

$ resolvectl query docker.io
docker.io: 2600:1f18:2148:bc02:4f78:625e:1ac1:714c -- link: eth0
           2600:1f18:2148:bc01:2822:9e2a:c82a:af0 -- link: eth0
           2600:1f18:2148:bc00:a518:1574:fea8:ccdb -- link: eth0
           44.193.181.103                      -- link: eth0
           3.224.227.198                       -- link: eth0
           44.219.3.189                        -- link: eth0

-- Information acquired via protocol DNS in 56.6ms.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: no
-- Data from: network

query quay.io (no issues)

$ resolvectl query quay.io
quay.io: 2600:1f18:483:cf01:b997:b639:9532:ee3a -- link: eth0
         2600:1f18:483:cf00:581e:1057:30cc:ebbc -- link: eth0
         2600:1f18:483:cf02:3615:1445:e17f:2ea5 -- link: eth0
         2600:1f18:483:cf01:c9f5:b3c:1acd:c1cf -- link: eth0
         2600:1f18:483:cf00:69a3:473d:d206:190a -- link: eth0
         2600:1f18:483:cf02:2c80:840d:d07:24b1 -- link: eth0
         54.88.176.144                         -- link: eth0
         34.236.131.237                        -- link: eth0
         34.194.10.179                         -- link: eth0
         34.206.201.197                        -- link: eth0
         18.209.251.225                        -- link: eth0
         3.210.113.103                         -- link: eth0

-- Information acquired via protocol DNS in 23.0ms.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: no
-- Data from: cache network

minikube /etc/resolv.conf

nameserver 192.168.105.1
search .

Testing curl

curl -I -sS -m 2 https://registry.k8s.io
curl: (7) Failed to connect to registry.k8s.io port 443 after 1 ms: Error

So, wha't the problem?

That's why I'm trying to figure it out. Using the tools within the minikube pod, all this shouldn't be a problem, but here we are. I would appreciate any help as I'm on this for quite some weeks now.

Thanks in advance.

Attach the log file

log.txt

Operating System

macOS (Default)

Driver

QEMU

Other related issues:

k8s-triage-robot commented 6 days ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale