@james-dc commented on Sat Apr 13 2019
This is a Bug Report
Problem:
Running minikube start as the setup guide suggests yields the following failure:
james@james-desktop:~$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.10
DISTRIB_CODENAME=cosmic
DISTRIB_DESCRIPTION="Ubuntu 18.10"
NAME="Ubuntu"
VERSION="18.10 (Cosmic Cuttlefish)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.10"
VERSION_ID="18.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=cosmic
UBUNTU_CODENAME=cosmic
james@james-desktop:~$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
> && chmod +x minikube
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 38.2M 100 38.2M 0 0 6992k 0 0:00:05 0:00:05 --:--:-- 7456k
james@james-desktop:~$ sudo cp minikube /usr/local/bin && rm minikube
james@james-desktop:~$ minikube start
๐ minikube v1.0.0 on linux (amd64)
๐คน Downloading Kubernetes v1.14.0 images in the background ...
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
๐ฅ Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
๐ฟ Downloading Minikube ISO ...
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
2019/04/13 20:05:33 No matching credentials were found, falling back on anonymous
142.88 MB / 142.88 MB [============================================] 100.00% 0s
๐ถ "minikube" IP address is 192.168.99.105
๐ณ Configuring Docker as the container runtime ...
๐ณ Version of container runtime is 18.06.2-ce
โ Waiting for image downloads to complete ...
โจ Preparing Kubernetes environment ...
๐พ Downloading kubeadm v1.14.0
๐พ Downloading kubelet v1.14.0
๐ฃ Failed to setup kubeconfig: writing kubeconfig: Error writing file : open : no such file or directory
๐ฟ Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
๐ https://github.com/kubernetes/minikube/issues/new
I found running sudo minikube start lets minikube start successfully:
james@james-desktop:~$ sudo minikube start
๐ minikube v1.0.0 on linux (amd64)
๐คน Downloading Kubernetes v1.14.0 images in the background ...
๐ฅ Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
๐ถ "minikube" IP address is 192.168.99.107
๐ณ Configuring Docker as the container runtime ...
๐ณ Version of container runtime is 18.06.2-ce
โ Waiting for image downloads to complete ...
โจ Preparing Kubernetes environment ...
๐ Pulling images required by Kubernetes v1.14.0 ...
๐ Launching Kubernetes v1.14.0 using kubeadm ...
โ Waiting for pods: apiserver proxy etcd scheduler controller dns
๐ Configuring cluster permissions ...
๐ค Verifying component health .....
๐ kubectl is now configured to use "minikube"
๐ก For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/
๐ Done! Thank you for using minikube!
However any further interaction with minikube / kubectl also requires the use of sudo to function properly which is not desirable.
Page to Update:
https://kubernetes.io/docs/tasks/tools/install-minikube/
The error indicates that the filename was "":
return errors.Wrapf(err, "Error writing file %s", filename)
I'm having the same issue. Which file is this referring to and how is it set? Is it ~/.kube/config?
So, I had KUBECONFIG set to a list of configs for various clusters I was working with. Apparently, this was prohibiting Minikube from starting. To resolve, I unset KUBECONFIG before starting minikube.
unset KUBECONFIG
minikube start
When you're done using minikube and have stopped it, you can source your .bashrc or .bash_profile (wherever KUBECONFIG is defined) or restart your terminal and resume working with the other clusters.
Hope this helps someone.
same here with minikube 1.3.0 on macos 10.14.6
minikube start --v=3
๐ minikube v1.3.0 on Darwin 10.14.6
๐ก Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
๐ Using the running virtualbox "minikube" VM ...
โ Waiting for the host to be provisioned ...
Waiting for SSH to be available...
Detecting the provisioner...
Setting Docker configuration on the remote daemon...
๐ณ Preparing Kubernetes v1.15.2 on Docker 18.09.8 ...
๐ฃ Failed to setup kubeconfig: writing kubeconfig: Error writing file : open : no such file or directory
๐ฟ Sorry that minikube crashed.
@den-is Can you share the output of env | grep KUBECONFIG?
It seems possible that you have KUBECONFIG set to an invalid location in your environment. Alternatively, please share the output of:
minikube start --alsologtostderr -v=4
Thanks!
I am curious why your customse kubeconfig was not usable by minikube ! if this is the case ! minikube shouldn't have cared ! if it doest, we need to detect and let user know by a solution message.
@tstromberg and I think that is pointed to right location
env | grep -i kube
KUBECONFIG=:/Users/den/.kube/config:/Users/den/.kube/config
I'm not sure why there is duplicate, but imagine it doesn't exist there, and there are many other "concatenated" kubeconfigs for different clusters
I had the same issue, the problem is the initial : in KUBECONFIG
KUBECONFIG=:/Users/den/.kube/config:/Users/den/.kube/config
should be
KUBECONFIG=/Users/den/.kube/config:/Users/den/.kube/config
Probably you have KUBECONFIG=$KUBECONFIG:/Users/den/.kube/config in your ~/.bash_profile
Although the error message could be clearer
@carlossg good point !
indeed I have export KUBECONFIG=$KUBECONFIG:$HOME/.kube/config
error message could be clearer and minikube can be smarter about empty strings too
Most helpful comment
So, I had KUBECONFIG set to a list of configs for various clusters I was working with. Apparently, this was prohibiting Minikube from starting. To resolve, I unset KUBECONFIG before starting minikube.
unset KUBECONFIGminikube startWhen you're done using minikube and have stopped it, you can source your .bashrc or .bash_profile (wherever KUBECONFIG is defined) or restart your terminal and resume working with the other clusters.
Hope this helps someone.