Closed dfang closed 3 years ago
does this issue happen on re-starting miniukube or on first start ?
have you verified that you can access docker hub through proxy ?
@medyagh
@medyagh
unset any HTTP_PROXY, HTTPS_PROXY, then run minikube start
without any proxy settings.
in minikube ssh,
$ docker pull alpine
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.64.1:53: read udp 192.168.64.95:47445->192.168.64.1:53: read: connection refused
$ curl -I docker.io
curl: (6) Could not resolve host: docker.io
$ ps -afe | grep dns
root 2509 1 3 00:19 ? 00:00:18 /usr/bin/kubelet --authorization-mode=Webhook --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --cgroup-driver=cgroupfs --client-ca-file=/var/lib/minikube/certs/ca.crt --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --container-runtime=docker --fail-swap-on=false --hostname-override=minikube --kubeconfig=/etc/kubernetes/kubelet.conf --pod-manifest-path=/etc/kubernetes/manifests
root 3935 3908 0 00:19 ? 00:00:02 /coredns -conf /etc/coredns/Corefile
root 3960 3933 0 00:19 ? 00:00:02 /coredns -conf /etc/coredns/Corefile
docker 7626 4561 0 00:27 pts/0 00:00:00 grep dns
$ ls /etc/coredns/Corefile
ls: cannot access '/etc/coredns/Corefile': No such file or directory
$ sudo cat /etc/coredns/Corefile
cat: /etc/coredns/Corefile: No such file or directory
@dfang Could you show the final solution here ? I met same problem...
for me hyperkit driver on mac had same issue. switching to vmwarefusion made the trick, though not a solution if you want to use hyperkit
Hi, Facing same issue while starting minikube on windows. Is there a specific solution or workaround for this.
minikube start --vm-driver=hyperv
- minikube v1.6.1 on Microsoft Windows 10 Pro 10.0.17763 Build 17763
- Selecting 'hyperv' driver from user configuration (alternates: [])
- Creating hyperv VM (CPUs=2, Memory=2000MB, Disk=20000MB) ... ! VM is unable to access k8s.gcr.io, you may need to configure a proxy or set --image-repository
- Preparing Kubernetes v1.17.0 on Docker '19.03.5' ...
- Pulling images ...
- Unable to pull images, which may be OK: running cmd: "/bin/bash -c \"sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm config images pull --config /var/tmp/minikube/kubeadm.yaml\"": /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.17.0:$PATH kubeadm config images pull --config /var/tmp/minikube/kubeadm.yaml": Process exited with status 1 stdout:
stderr: W1223 11:14:47.619633 3662 common.go:77] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta1". Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version. W1223 11:14:47.620481 3662 common.go:77] your configuration file uses a deprecated API spec: "kubeadm.k8s.io/v1beta1". Please use 'kubeadm config migrate --old-config old.yaml --new-config new.yaml', which will write the new, similar spec using a newer API version. W1223 11:14:47.622864 3662 validation.go:28] Cannot validate kube-proxy config - no validator is available W1223 11:14:47.622906 3662 validation.go:28] Cannot validate kubelet config - no validator is available failed to pull image "k8s.gcr.io/kube-apiserver:v1.17.0": output: Error response from daemon: Get https://k8s.gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) , error: exit status 1 To see the stack trace of this error execute with --v=5 or higher
Had the same issue on windows+virtualbox+minihube.
Problem was the DNS. By adding nameserver 8.8.8.8
to /etc/resolv.conf
. Kubernetes was able to pull the images. Interestingly enough resolv.conf shortly reverted to having just original entry...
Had the same issue on windows+virtualbox+minihube. Problem was the DNS. By adding nameserver 8.8.8.8 to /etc/resolv.conf . Kubernetes was able to pull the images. Interestingly enough resolv.conf shortly reverted to having just original entry...
After stopping minikube VM, I added nameserver server 8.8.8.8 to /etc/resolv.conf in minikube VM (deployed on HyperV) and then started the VM but the issue still persists. Anything that I am missing here
I have the same issue. tried what vikas86 did (on mac+minikube+virtualbox).. to no avail.
Finally narrowed down the issue, for which the solution is providing public network access to minikube VM.
For minikube to pull images it needs to have a public network access which can be done by creating a Virtual network switch in HyperV or something equivalent in virtualbox (NAT or Bridge).
In HyperV create a virtual network switch (type external) - all default settings. In windows powershell enter below cmd:
minikube start --vm-driver hyperv --hyperv-virtual-switch "My Virtual Switch"
This solves below issues while starting minikube:
I am using KVM with minikube on linux and facing the same issue, not able to fetch any of the public images from docker hub
Worked.. https_proxy=
Details here : https://kubernetes.io/docs/setup/learning-environment/minikube/#starting-a-cluster
I am using KVM with minikube on linux and facing the same issue, not able to fetch any of the public images from docker hub
@spsarolkar make sure you are able to access public network from your minikube VM. you would need a bridge adapter in Virtual box for that.
Hi!
Im still problem with pull images via MiniKube
` C:\Windows\system32>minikube ssh
$ docker pull nginx:alpine Error response from daemon: Get https://registry-1.docker.io/v2/library/nginx/manifests/alpine: remote error: tls: bad record MAC `
my minikube starts on Windows 10 via cmd :
minikube start --vm-driver hyperv --hyperv-virtual-switch "Default Switch"
info during starts minikube :
`
Regards Pawel
If anyone faces the same problem on MacOS, this fixes it (you will need to install VirtualBox first):
$ minikube start --vm-driver virtualbox
IMHO this issue should not be closed, as there should be a way to run Minikube
on MacOS with the native hypervisor (or, at the very least, a warning message and a suggested workaround).
@massenz : please open a new issue, if you continue to have issues with --vm-driver=hyperkit
Using --vm-driver virtualbox is of course a workaround, but like you say the native one should work
Good point, done: see #6296
Finally narrowed down the issue, for which the solution is providing public network access to minikube VM.
For minikube to pull images it needs to have a public network access which can be done by creating a Virtual network switch in HyperV or something equivalent in virtualbox (NAT or Bridge).
In HyperV create a virtual network switch (type external) - all default settings. In windows powershell enter below cmd:
minikube start --vm-driver hyperv --hyperv-virtual-switch "My Virtual Switch"
This solves below issues while starting minikube:
- VM is unable to access k8s.gcr.io
- Unable to pull images,
Would like to add I was unable to run the command for creating the switch, those who are facing the issue try this , I am using hyperkit VM and running on MACOS Mojave. But even after running this problem still persists, I was just trying to spin off nginx container inside a pod using this pod.yml apiVersion: v1 kind: Pod metadata: name: hello-pod spec: containers:
minikube start --vm-driver=hyperkit --hyperv-virtual-switch="My virtual switch"
I'm running into same issue on MacOS mojave. Damn near about to drop kick my laptop. Neither of the fixes are working for me.
@wpdildine - see #6296
TL;DR: minikube start --vm-driver=virtualbox
you'll need to download / install Virtualbox on your Mac
I somehow ran into exactly the same problem, even after multiple minikube stop && minikube delete
...
The following worked for me on Windows 10 Pro using the Hyper-V driver:
minikube ssh
sudo vi /etc/systemd/network/10-eth1.network
add DNS=8.8.8.8
under [Network]
sudo vi /etc/systemd/network/20-dhcp.network
add DNS=8.8.8.8
under [Network]
sudo systemctl restart systemd-networkd
curl google.com
or docker pull
I somehow ran into exactly the same problem, even after multiple
minikube stop && minikube delete
... The following worked for me on Windows 10 Pro using the Hyper-V driver:
minikube ssh
sudo vi /etc/systemd/network/10-eth1.network
addDNS=8.8.8.8
under[Network]
sudo vi /etc/systemd/network/20-dhcp.network
addDNS=8.8.8.8
under[Network]
sudo systemctl restart systemd-networkd
- To test it execute something that has to resolve using dns, like
curl google.com
ordocker pull
This worked for my on my mac!
@wpdildine - see #6296
TL;DR:
minikube start --vm-driver=virtualbox
you'll need to download / install Virtualbox on your Mac
This did the trick for me on my Linux Box- worked straight away with VirtualBox. Tried running minikube on docker before that and almost went crazy!
I somehow ran into exactly the same problem, even after multiple
minikube stop && minikube delete
... The following worked for me on Windows 10 Pro using the Hyper-V driver:
minikube ssh
sudo vi /etc/systemd/network/10-eth1.network
addDNS=8.8.8.8
under[Network]
sudo vi /etc/systemd/network/20-dhcp.network
addDNS=8.8.8.8
under[Network]
sudo systemctl restart systemd-networkd
- To test it execute something that has to resolve using dns, like
curl google.com
ordocker pull
It worked fine for me on mac. Thanks!
But why go through all that, if a much simpler (IMHO) is to just install Virtualbox and do this:
minikube start --vm-driver virtualbox
Those of you commenting on other drivers, you might want to add your thoughts to #8135
The VirtualBox driver and the so called "native virtualization" drivers (HyperKit/HyperV/libvirt) will remain, even if the Docker/Podman drivers are available. The question is which should be default.
There is a new option called --vm
, that will make sure to select some kind of hypervisor driver.
See also https://minikube.sigs.k8s.io/docs/drivers/
The intro kubernetes course still uses VirtualBox...
Fair enough, @afbjorklund, I wasn't "commenting" on other drivers: I was just noting the weird and wonderful contortions folks were going through (also, worth noting, very temporary and manual), and thought I'd suggest a simpler way.
For that matter, there's also #6296, which I dutifully filed following your suggestions; unfortunately that one seems to have stalled for now.
@wpdildine - see #6296
TL;DR:
minikube start --vm-driver=virtualbox
you'll need to download / install Virtualbox on your Mac
This works for me. By default the vm driver would be 'hyperkit' unless otherwise specified.
I somehow ran into exactly the same problem, even after multiple
minikube stop && minikube delete
... The following worked for me on Windows 10 Pro using the Hyper-V driver:
minikube ssh
sudo vi /etc/systemd/network/10-eth1.network
addDNS=8.8.8.8
under[Network]
sudo vi /etc/systemd/network/20-dhcp.network
addDNS=8.8.8.8
under[Network]
sudo systemctl restart systemd-networkd
- To test it execute something that has to resolve using dns, like
curl google.com
ordocker pull
It doesn't work for me. However...
If anyone faces the same problem on MacOS, this fixes it (you will need to install VirtualBox first):
$ minikube start --vm-driver virtualbox
IMHO this issue should not be closed, as there should be a way to run
Minikube
on MacOS with the native hypervisor (or, at the very least, a warning message and a suggested workaround).
...works fine.
@wpdildine - see #6296
TL;DR:
minikube start --vm-driver=virtualbox
you'll need to download / install Virtualbox on your Mac
emm... virtualbox is too heavy, minikube at least start 3 VMs, dell 7050 with 8GB ram and intel i7-6700, system frozen.
I somehow ran into exactly the same problem, even after multiple
minikube stop && minikube delete
... The following worked for me on Windows 10 Pro using the Hyper-V driver:1. `minikube ssh` 2. `sudo vi /etc/systemd/network/10-eth1.network` add `DNS=8.8.8.8` under `[Network]` 3. `sudo vi /etc/systemd/network/20-dhcp.network` add `DNS=8.8.8.8` under `[Network]` 4. `sudo systemctl restart systemd-networkd` 5. To test it execute something that has to resolve using dns, like `curl google.com` or `docker pull`
Didn't work for me on Mac 😞
Same issue here under hyperkit
I did a restart after doing the following
minikube delete
upon restart
minkube start --driver=docker
minikube status
minikube ssh
on windows 10, Docker -> Setup -> Resources -> enable Manual DNS config value=8.8.8.8 restart windows minikube delete & start, thats alls for me, works fine.
remenber is windows
I still have this issue, why is this closed without an explanation?
Agreed - this issue has not been resolved to a point that explains how to correct this issue. Adding the DNS resolution entries as stated above has not changed the behavior or minikube being able to pull or to resolve hosts.
@sspieker-cc: You can't reopen an issue/PR unless you authored it or you are a collaborator.
Hi, guys. Though I am not familiar with the codes, yet ,I figured out an workaround for this problem. You can use minikube cach subcommand to cache the images first, and then , minikube start. The programme would use the cached image instead of downloading from the net. If this is helpful, reply to me, I'd like to know that this way applies to others.
I still have this issue, why is this closed without an explanation?
does this help your case https://github.com/kubernetes/minikube/issues/4589#issuecomment-718019197 ?
@arashbi @wpdildine I am curious if you still have this issue with docker driver with latest version of minikube?
It happens on hyperkit, I am not sure what you mean by docker driver
yes, i still have the issue with docker driver on the latest version
Based on the messages, I'm pretty confident that this is a proxy configuration issue, and a very old one at that. Marking as obsolete, as the handling has changed since 2019.
If you run into a similar problem, please open a new issue.
Switched to docker for mac long ago, since minikube new version support load balancer, i tried it today.
but i can't pull any images.
The exact command to reproduce the issue:
The full output of the command that failed: after startup, change to minikube context
minikube addons list | grep dns
shows nothings ? is that the problem, why kube-dns, coredns removed ?docker info
shows HTTP_PROXY, HTTPS_PROXY are correctly configured.where is the configuration for docker in minikube ssh ?
The output of the
minikube logs
command:The operating system version: macOS 10.14.5