Description
Hey,
I'm trying to do a quick-start local setup on my MacOS Machine:
Run the following command
minikube start --vm-driver=hyperkit -v=9
And I get the following output / debug
`minikube v0.35.0 on darwin (amd64)
🔥 Creating hyperkit VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
Found binary path at /usr/local/bin/docker-machine-driver-hyperkit
...
...
About to run SSH command:
sudo mkdir -p /etc/sysconfig && printf %s "
CRIO_MINIKUBE_OPTIONS='--insecure-registry 10.96.0.0/12 '
" | sudo tee /etc/sysconfig/crio.minikube
SSH cmd err, output: :
CRIO_MINIKUBE_OPTIONS='--insecure-registry 10.96.0.0/12 '
...
📶 "minikube" IP address is 192.168.64.6
🐳 Configuring Docker as the container runtime ...
Found binary path at /usr/local/bin/docker-machine-driver-hyperkit
Launching plugin server for driver hyperkit
Plugin server listening at address 127.0.0.1:62493
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
✨ Preparing Kubernetes environment ...
(minikube) Calling .GetURL
🚜 Pulling images required by Kubernetes v1.13.4 ...
❌ Unable to pull images, which may be OK: running cmd: sudo kubeadm config images pull --config /var/lib/kubeadm.yaml: command failed: sudo kubeadm config images pull --config /var/lib/kubeadm.yaml
stdout:
stderr: failed to pull image "k8s.gcr.io/kube-apiserver:v1.13.4": output: Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443: connect: invalid argument
, error: exit status 1
: Process exited with status 1
🚀 Launching Kubernetes v1.13.4 using kubeadm ...
💣 Error starting cluster: kubeadm init:
sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI
[init] Using Kubernetes version: v1.13.4
[preflight] Running pre-flight checks
[WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
[WARNING Swap]: running with swap on is not supported. Please disable swap
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-apiserver:v1.13.4: output: Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443: connect: invalid argument
, error: exit status 1
[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-controller-manager:v1.13.4: output: Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443: connect: invalid argument
, error: exit status 1
[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-scheduler:v1.13.4: output: Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443: connect: invalid argument
, error: exit status 1
[ERROR ImagePull]: failed to pull image k8s.gcr.io/kube-proxy:v1.13.4: output: Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443: connect: invalid argument
, error: exit status 1
[ERROR ImagePull]: failed to pull image k8s.gcr.io/pause:3.1: output: Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443: connect: invalid argument
, error: exit status 1
[ERROR ImagePull]: failed to pull image k8s.gcr.io/etcd:3.2.24: output: Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443: connect: invalid argument
, error: exit status 1
[ERROR ImagePull]: failed to pull image k8s.gcr.io/coredns:1.2.6: output: Error response from daemon: Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443: connect: invalid argument
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
: Process exited with status 1
😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉 https://github.com/kubernetes/minikube/issues/new`
Again my OS is MacOS High Sierra Version 10.13.6
I am able to pull the images using docker pull so don't think it's a network issue, however it seems unable to download or access the kubeadm, which I think is something I may need to install separately but having found any guides or documentation on this. I may be missing something but greatly appreciate your assistance on this ahead of time.
Activity
huguesalary commentedon Mar 12, 2019
Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443
This is quite a weird IP. What does
nslookup k8s.gcr.io
return? It seems to me you have an internal DNS issue.hect1c commentedon Mar 13, 2019
This is my response
Server: 10.128.34.91
Address: 10.128.34.91#53
Non-authoritative answer:
Name: k8s.gcr.io
Address: 0.0.44.248
Please note: I am in China where google is blocked, but I do have my VPN on.
huguesalary commentedon Mar 13, 2019
That’s what I thought, the issue is with the DNS returning an invalid IP. I’d have thought that through a VPN you’d get the correct ip.
Not sure what your options are since you are in China. For me the k8s.gcr.io resolves to 74.125.20.82.
[-]minikube start --vm-driver=hyperkit fails on pulling kube images[/-][+]China: failed to pull image... Get https://k8s.gcr.io/v2/: dial tcp 0.0.42.22:443: connect: invalid argument[/+]tstromberg commentedon Mar 13, 2019
Your DNS is responding with an address that apparently is not available. You can try this to possibly work-around the issue by fetching the images outside of the VM using:
minikube start --cache-images
Or by passing information to Docker so that it can use an HTTP proxy: https://github.com/kubernetes/minikube/blob/master/docs/http_proxy.md
Let me know what you find out! Once #3714 is merged, you'll be able to specify
--image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
daniel-farina commentedon Mar 17, 2019
Deleting the local config fixed this issue for me:
rm -rf ~/.minikube
I run it again and all errors were gone.
kingonion commentedon Apr 2, 2019
In china, because of the GFW, you can't pull images from
k8s.gcr.io
without a VPN. But you can pull the needed images fromregistry.cn-hangzhou.aliyuncs.com/google_containers
and tag them. If the needed images exist on the local system, the starting process will go on even with pulling error. I wrote a shell script that can help you install minikube on Linux OS easily. And you can also make a offline installation package by using the script. The project home is https://github.com/Kingonion/minikube-on-linuxgbraad commentedon Apr 2, 2019
maxnilz commentedon Apr 17, 2019
Hi, I have the same problem with you, after some digging, I found the
docker pull
request will first go todocker daemon
via REST endpoint/images/create
, and thedocker daemon
will take over the pulling work. In order to makedocker daemon
to use the proxy, we need to sethttp_proxy & https_proxy
to the place wheredockerd
running, i.e,root
user.Here is my scenario:
OS: I'm using ubuntu18.04 desktop
Where the docker daemon is running: the docker daemon run in
root
userWhat supervisor host the docker daemon:
systemd
Do I set the
https_proxy & http_proxy
: yes, I set them for the normal user, but didn't set them forroot
user.How I solve this:
Because I just want to set
http_proxy & https_proxy
fordocker daemon(dockerd)
only for root, I set the proxy info intosystemd
service unit, like this(for my computer, the config file is located here:/lib/systemd/system/docker.service
:Hope this will help somebody who got the same error like me.
singleye commentedon Apr 24, 2019
I had the same issue on 'MacOS 10.14.4 Majave'
Pull and tag images doesn't work for me
But specify '--image-repository' works for me
BTW, I'm using minikube v1.0.0
6 remaining items