4

Trying to run any Pod in Minikube will fail with an ErrImagePull error:

$ kubectl get pods
utils   0/1     ErrImagePull       0          8m57s

Looking at the pod's logs, it shows that HTTP request timed out:

$ kubectl logs utils

shows something along the lines of:

kubelet, minikube  Failed to pull image "massenz/dnsutils:1.1": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

However, running the container directly from Docker works just fine:

$ docker run --rm -d massenz/dnsutils:1.1 sleep infinity

succeeds and the container can be accessed (e.g., via exec /bin/bash).

1 Answers1

3

This is issue is due to the fact that the "native" MacOS hypervisor VM does not have external connectivity.

This has been reported here.

The fix is rather trivial, but requires installing VirtualBox first, and then using as the VM Driver:

$ minikube start --vm-driver virtualbox

After that, launching pods works just fine:

$ kubectl apply -f utils.yaml                
pod/utils created

$ kubectl get pods -w
NAME    READY   STATUS              RESTARTS   AGE
utils   0/1     ContainerCreating   0          5s
utils   1/1     Running             0          9s