Minikube: Moving files into cluster fails: open ~/.minikube/cache/localkube/localkube-v1.9.0: no such file or directory

Created on 26 Jan 2018  路  29Comments  路  Source: kubernetes/minikube

BUG REPORT

Environment:
OSX 10.13.3

Minikube version (use minikube version):
minikube version: v0.25.0
kgi-mbp-i7-2:~ kgignatyev$ minikube update-check
CurrentVersion: v0.25.0
LatestVersion: v0.25.0

kgi-mbp-i7-2:~ kgignatyev$ cat /etc/os-release
cat: /etc/os-release: No such file or directory
kgi-mbp-i7-2:~ kgignatyev$ echo "";

kgi-mbp-i7-2:~ kgignatyev$ echo "VM driver":
VM driver:
kgi-mbp-i7-2:~ kgignatyev$ grep DriverName ~/.minikube/machines/minikube/config.json
"DriverName": "virtualbox",
kgi-mbp-i7-2:~ kgignatyev$ echo "";

kgi-mbp-i7-2:~ kgignatyev$ echo "ISO version";
kgi-mbp-i7-2:~ kgignatyev$ grep -i ISO ~/.minikube/machines/minikube/config.json
"Boot2DockerURL": "file:///Users/kgignatyev/.minikube/cache/iso/minikube-v0.25.1.iso",

What happened:
kgi-mbp-i7-2:~ kgignatyev$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
E0126 13:13:03.231219 13209 start.go:234] Error updating cluster: Error running scp command: sudo scp -t /usr/local/bin output: scp: Broken pipe
: Process exited with status 1

What you expected to happen:
minikube starts as usual (I have been using it for couple of years now)
How to reproduce it (as minimally and precisely as possible):

Output of minikube logs (if applicable):
kgi-mbp-i7-2:~ kgignatyev$ minikube logs
-- Logs begin at Fri 2018-01-26 21:13:01 UTC, end at Fri 2018-01-26 21:17:44 UTC. --
-- No entries --

Anything else do we need to know:
If I try to delete .minikube

kgi-mbp-i7-2:~ kgignatyev$ minikube stop
Stopping local Kubernetes cluster...
Machine stopped.
kgi-mbp-i7-2:~ kgignatyev$ rm -fR .minikube
kgi-mbp-i7-2:~ kgignatyev$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Downloading Minikube ISO
142.22 MB / 142.22 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
E0126 13:19:24.954401 13444 start.go:234] Error updating cluster: Error updating localkube from uri: Error creating localkube asset from url: Error opening file asset: /Users/kgignatyev/.minikube/cache/localkube/localkube-v1.9.0: open /Users/kgignatyev/.minikube/cache/localkube/localkube-v1.9.0: no such file or directory

If I try to create the directory it still fails:
kgi-mbp-i7-2:~ kgignatyev$ mkdir /Users/kgignatyev/.minikube/cache/localkube/localkube-v1.9.0
kgi-mbp-i7-2:~ kgignatyev$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
E0126 13:22:17.328239 13527 start.go:234] Error updating cluster: Error running scp command: sudo scp -t /usr/local/bin output: scp: Broken pipe
: Process exited with status 1

still no entries in log

cvirtualbox kinbug omacos

Most helpful comment

I downloaded it from https://github.com/kubernetes/minikube/releases/download/v0.25.0/localkube then I copied the file in ~/.minikube/cache/localkube/localkube-v1.9.0
It seems to start

.minikube/cache/localkube$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

All 29 comments

I am having the same issue.

E0126 13:22:42.801521 74141 start.go:234] Error updating cluster: Error updating localkube from uri: Error creating localkube asset from url: Error opening file asset: /Users/brandonbethke/.minikube/cache/localkube/localkube-v1.9.0: open /Users/brandonbethke/.minikube/cache/localkube/localkube-v1.9.0: no such file or directory

Same issue here, as well with both virtualbox and hyperkit, Mac OS 10.13.3:

Moving files into cluster...
E0126 14:28:28.054587 29441 start.go:234] Error updating cluster: Error updating localkube from uri: Error creating localkube asset from url: Error opening file asset: /Users/myuser/.minikube/cache/localkube/localkube-v1.9.0: open /Users/myuser/.minikube/cache/localkube/localkube-v1.9.0: no such file or directory

Possible workaround:

Download this file:
https://github.com/kubernetes/minikube/releases/download/v0.25.0/localkube
rename it to localkube-v1.9.0 and place it in:
/Users/<myuser>/.minikube/cache/localkube/

does not seem to help:

kgi-mbp-i7-2:~ kgignatyev$ mv ~/Downloads/localkube ~/.minikube/cache/localkube/localkube-v1.9.0

kgi-mbp-i7-2:~ kgignatyev$ ls -al ~/.minikube/cache/localkube/localkube-v1.9.0/localkube
Display all 190 possibilities? (y or n)
kgi-mbp-i7-2:~ kgignatyev$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
E0126 13:42:57.433437 13866 start.go:234] Error updating cluster: Error running scp command: sudo scp -t /usr/local/bin output: scp: Broken pipe
: Process exited with status 1

same

I downloaded it from https://github.com/kubernetes/minikube/releases/download/v0.25.0/localkube then I copied the file in ~/.minikube/cache/localkube/localkube-v1.9.0
It seems to start

.minikube/cache/localkube$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

@atali method did the trick with:
wget https://github.com/kubernetes/minikube/releases/download/v0.25.0/localkube && mv ./localkube ~/.minikube/cache/localkube/localkube-v1.9.0

$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
E0126 21:57:48.818820   93856 start.go:234] Error updating cluster:  Error updating localkube from uri: Error creating localkube asset from url: Error opening file asset: /Users/devbox/.minikube/cache/localkube/localkube-v1.9.0: open /Users/devbox/.minikube/cache/localkube/localkube-v1.9.0: no such file or directory

$ minikube delete
Deleting local Kubernetes cluster...
Machine deleted.

$ wget https://github.com/kubernetes/minikube/releases/download/v0.25.0/localkube && mv ./localkube ~/.minikube/cache/localkube/localkube-v1.9.0
--2018-01-26 22:05:18--  https://github.com/kubernetes/minikube/releases/download/v0.25.0/localkube
Resolving github.com... 192.30.253.113, 192.30.253.112
Connecting to github.com|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/56353740/cf5e1d30-0289-11e8-91f8-118327f47f05?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180126%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180126T220519Z&X-Amz-Expires=300&X-Amz-Signature=fad5f0be793d5bc2b112cbfcbb1c8ff0087174d1868bbc75bc4b05f1835c6a7a&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dlocalkube&response-content-type=application%2Foctet-stream [following]
--2018-01-26 22:05:19--  https://github-production-release-asset-2e65be.s3.amazonaws.com/56353740/cf5e1d30-0289-11e8-91f8-118327f47f05?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180126%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180126T220519Z&X-Amz-Expires=300&X-Amz-Signature=fad5f0be793d5bc2b112cbfcbb1c8ff0087174d1868bbc75bc4b05f1835c6a7a&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dlocalkube&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com... 54.231.80.240
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com|54.231.80.240|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 170295656 (162M) [application/octet-stream]
Saving to: 'localkube'

localkube                                                  100%[=========================================================================================================================================>] 162.41M   956KB/s   in 2m 35s 

2018-01-26 22:07:54 (1.05 MB/s) - 'localkube' saved [170295656/170295656]

$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

$ minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.104

Ahh, yes, that works. Previously I did not delete existing localkube-v1.9.0 directory and ended up with localcube copied inside it.

So this works:
cd .minikube/cache/
kgi-mbp-i7-2:cache kgignatyev$ cd localkube/
kgi-mbp-i7-2:localkube kgignatyev$ ls
localkube-v1.9.0
kgi-mbp-i7-2:localkube kgignatyev$ rm localkube-v1.9.0
rm: localkube-v1.9.0: is a directory
kgi-mbp-i7-2:localkube kgignatyev$ rm -fR localkube-v1.9.0
kgi-mbp-i7-2:localkube kgignatyev$ mv ~/Downloads/localkube localkube-v1.9.0
minikube start

same

brew cask reinstall minikube

if [[ ! -f ~/.minikube/cache/localkube/localkube-v1.9.0/localkube ]]; then
    curl -L -O https://github.com/kubernetes/minikube/releases/download/v0.25.0/localkube
    mkdir -p ~/.minikube/cache/localkube/localkube-v1.9.0
    mv localkube ~/.minikube/cache/localkube/localkube-v1.9.0/
fi

minikube start

this appears to effect only version 1.9. minikube start --kubernetes-version v1.8.0 works for me.

@lazzarello did your dashboard come up with the minikube binary and 1.8.0? Mine did not. I'm also seeing a new error when I try 1.9.0.

Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
E0126 15:20:16.503730    7219 start.go:234] Error updating cluster:  Error running scp command: sudo scp -t /usr/local/bin output: scp: Broken pipe

I am seeing this error now when trying to access the dashboard:

Error: 'tls: oversized record received with length 20527'
Trying to reach: 'https://172.17.0.2:9090/'

I have no problem

Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.

I'm still having the issue. I'm able to get the same result as doing the curl request e.g. minikube is accessible through kubectl but dashboard is not functional:

brew cask reinstall minikube

minikube start --vm-driver=hyperkit \
    --kubernetes-version="v1.8.0" \
    --iso-url="https://storage.googleapis.com/minikube/iso/minikube-v0.24.0.iso"

I believe I have run into this issue in the past.

I basically had started minikube with --kubernetes-version="v1.8.0" then stopped it, then started it again, this time without --kubernetes-version="v1.8.0":

minikube start --kubernetes-version="v1.8.0"
minikube stop
minikube start

The 2nd start ends up trying to use kubernetes 1.9.0 instead of 1.8.0.

I fixed this by,

  1. Stopping minikube minikube stop
  2. Editing ~/.minikube/profiles/minikube/config.json and replacing the string v1.9.0 to v1.8.0 (towards the end of the file in the KubernetesConfig section)
  3. Starting minikube again, with --kubernetes-version="v1.8.0": minikube start --kubernetes-version="v1.8.0"

Edit: After re-reading this thread, it seems people specifically want to use 1.9.0, in which case I also ran into this bug (and also another one that is that minikube does not remember me wanting to use 1.8.0), but my comment is not the fix you're looking for.

I believe with 1.8.0 https://github.com/kubernetes/minikube/issues/2256 will still bite. 1.9.0 please

looks like #2472 fixed this issue

2472 did fix the localkube download issue but the 1.8.0 dashboard and running 1.9.0 is still totally borked.

@dstroot Try http://localhost:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy

@steindaniel - thanks much. I've been using "minikube dashboard". It works. I used to use "kubectl proxy" and then just hit the dashboard at localhost/8001/ui.

Tried @steindaniel suggestion, worked, because localhost:8001/ui/ redirects to http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/ after using kubectl proxy

I had the same dashboard issue as @dstroot on kubernetes 1.9.0 on OSX:

Error: 'tls: oversized record received with length 20527'
Trying to reach: 'https://172.17.0.2:9090/'

Using the http://localhost:8001/ui/ link which redirects to http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/ with the error.

Solution: Using http://localhost:8001/api/v1/namespaces/kube-system/services/kubernetes-dashboard/proxy as suggested by @steindaniel fixed the problem (but maybe at the expense of disabling https?).

Trying "minikube delete", and then "minikube start" should fix the problem.

FWIW, in case this helps someone else,
I hadn't used minikube in quite a while (was previously using it with various drivers). I was running into errors with the previously used drivers (vmwarefusion) that used to work:

Was getting errors like:

E0523 12:17:57.956491 6812 start.go:165] Error starting host: Error creating host: Error executing step: Creating VM.
: exit status 1

sw_vers
ProductName:    Mac OS X
ProductVersion: 10.11.6
BuildVersion:   15G20015

Updated minikube using brew cask

minikube version
minikube version: v0.27.0

Switching (and installing) updated hyperkit driver (updated xhyve also worked for me although it now barks about it being deprecated)--Followed the doc/process here--i.e.:
ref: https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver

curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit \
> && chmod +x docker-machine-driver-hyperkit \
> && sudo mv docker-machine-driver-hyperkit /usr/local/bin/ \
> && sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit \
> && sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit

As others noted above, purge our old cruft
minikube delete
Then was able to start minikube again without failures
minikube start --cpus 4 --memory 4096 --vm-driver=hyperkit --insecure-registry="0.0.0.0/0" -v 5

FYI: After upgrading minikube from v0.27.0 to v0.28.0 via brew cask, I had to complete this process. I followed @cmcconnell1's instructions and it worked.

(It's a bummer that I had to destroy all my local k8s resources, but that's life.)

   minikube delete
   minikube start

Seems to have done it for me.

Environment:
OSX 10.13.6
VirtualBox-5.2.16-123759-OSX
minikube-darwin-amd64 v0.28.2

localhost:v1.10.0 :leihui$ minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0802 14:11:33.136236 886 start.go:300] Error starting cluster: kubeadm init error
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 &&
sudo /usr/bin/kubeadm alpha phase addon kube-dns
running command: : running command:
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 &&
sudo /usr/bin/kubeadm alpha phase addon kube-dns

.: Process exited with status 1

An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:

minikube config set WantReportErrorPrompt false

Please enter your response [Y/n]:

why what happened?

@steindaniel Yesterday I was able to access the dashboard via http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/ but I got Error: 'tls: oversized record received with length 20527' Trying to reach: 'https://172.17.0.2:9090/' today when I tried kubectl proxy again.

Very surprised to find out that your solution works for me and what is the difference between them? I'm totally confused right now.

EDIT:
For Win 10 users whose default browser is Edge, when you cannot reach the page after running "minikube dashboard", just try IE instead.

Closing open localkube issues, as localkube was long deprecated and removed from the last two minikube releases. I hope you were able to find another solution that worked out for you - if not, please open a new PR.

Was this page helpful?
0 / 5 - 0 ratings