Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minikube fails for Kubernetes v1.8.0 using kubeadm bootstrapper #2018

Closed
webwurst opened this issue Sep 29, 2017 · 22 comments
Closed

Minikube fails for Kubernetes v1.8.0 using kubeadm bootstrapper #2018

webwurst opened this issue Sep 29, 2017 · 22 comments

Comments

@webwurst
Copy link
Contributor

webwurst commented Sep 29, 2017

Trying to run the freshly released Kubernetes v1.8.0 does not work for me:

$ minikube start --cpus 4 --memory 4096 --kubernetes-version v1.8.0 --vm-driver kvm --bootstrapper kubeadm
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E0929 12:15:14.339869   23029 start.go:261] Error starting cluster:  kubeadm init error running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --skip-preflight-checks: Process exited with status 1

Choosing v1.7.6 or v1.7.7 works fine on the same system:

$ minikube start --cpus 4 --memory 4096 --kubernetes-version v1.7.7 --vm-driver kvm --bootstrapper kubeadm
Starting local Kubernetes v1.7.7 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.7.7
Downloading kubelet v1.7.7
Finished Downloading kubelet v1.7.7
Finished Downloading kubeadm v1.7.7
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
$ kubectl get nodes
NAME       STATUS    AGE       VERSION
minikube   Ready     1m        v1.7.7

Environment:
minikube version: v0.22.2

OS:
NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu Artful Aardvark (development branch)"
VERSION_ID="17.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=artful
UBUNTU_CODENAME=artful

VM driver:
    "DriverName": "kvm",

ISO version
        "ISO": "/home/webwurst/.minikube/machines/minikube/boot2docker.iso",
        "Boot2DockerURL": "file:///home/webwurst/.minikube/cache/iso/minikube-v0.23.4.iso",
@muriithi
Copy link

@webwurst You can get a list of supported kubernetes versions by running;
minikube get-k8s-versions

@webwurst
Copy link
Contributor Author

Right, but I think that is for the default localkube bootstrapper. with kubeadm you should be able to choose freely among released Kubernetes versions. And in fact it works fine for me with v1.7.6 and v1.7.7 as stated above, although these are not listed with minikube get-k8s-versions. But thanks for the heads-up :)

@muriithi
Copy link

Could be #1996

@r2d4
Copy link
Contributor

r2d4 commented Sep 29, 2017

I have a PR to fix this, but I was reworking it to add args to all components, I'll try to get it pushed later today #1985

@uromahn
Copy link

uromahn commented Oct 2, 2017

Just as an add-on: I am trying to start a k8s v1.5.7 using the same method and are seeing the exact same error message. Will PR #1985 also fix this issue or is there another "special fix" needed?

@r2d4
Copy link
Contributor

r2d4 commented Oct 5, 2017

This should be fixed by #1985.

@uromahn I'm not sure what the issues with running v1.5.7 would be but it might be worth it to open up a separate issue.

@gtirloni
Copy link
Contributor

gtirloni commented Oct 9, 2017

It seems to be working with minikube 0.22.3 here:

$ minikube start --kubernetes-version v1.8.0 --bootstrapper kubeadm
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.8.0
Downloading kubelet v1.8.0
Finished Downloading kubelet v1.8.0
Finished Downloading kubeadm v1.8.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.

$ kubectl get nodes
NAME       STATUS    AGE       VERSION
minikube   Ready     1m        v1.8.0

However, I don't know the level of support for the new kubeadm bootstrapper. Is it possible that aiming for locakube to support 1.8.0 for now would be less disruptive?

@uromahn
Copy link

uromahn commented Oct 9, 2017

This issue needs to be re-opened since the kubeadm bootstrapper is not working on Mac OS X!

When I started it trying with k8s v1.5.7 I am getting the following error message:
Starting local Kubernetes v1.5.7 cluster...
Starting VM...
Downloading Minikube ISO
139.09 MB / 139.09 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Downloading kubelet v1.5.7
Downloading kubeadm v1.5.7
Finished Downloading kubelet v1.5.7
Finished Downloading kubeadm v1.5.7
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E1009 08:57:04.359491 6996 start.go:260] Error starting cluster: kubeadm init error running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --skip-preflight-checks: Process exited with status 1

After that, when I try to start it with any other k8s version, e.g. v1.8.0 or v1.7.7 it "hangs" after the message "Starting cluster components..."

@lilic
Copy link
Member

lilic commented Oct 10, 2017

@uromahn Works normally for me on a Mac just fine:

○ minikube delete && minikube start --kubernetes-version v1.8.0 --bootstrapper kubeadm
Deleting local Kubernetes cluster...
Machine deleted.
Starting local Kubernetes v1.8.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.
○ kubectl version
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"6e937839ac04a38cac63e6a7a306c5d035fe7b0a", GitTreeState:"clean", BuildDate:"2017-09-28T22:57:57Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"6e937839ac04a38cac63e6a7a306c5d035fe7b0a", GitTreeState:"clean", BuildDate:"2017-09-28T22:46:41Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

Have you tried upgrading minikube itself, the version I am using is v0.22.3.

@fossilet
Copy link

fossilet commented Oct 10, 2017

@lilic thanks, I was just trying until I run minikube delete from your post, and now it works.

$ minikube delete
Deleting local Kubernetes cluster...
Machine deleted.
$ minikube start --kubernetes-version v1.8.0 --bootstrapper=kubeadm
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Downloading Minikube ISO
 139.09 MB / 139.09 MB [============================================] 100.00% 0s
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.

@F21
Copy link

F21 commented Oct 10, 2017

It's failing on Windows 10 for me:

$ minikube start --kubernetes-version v1.8.0 --bootstrapper kubeadm
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
E1011 08:29:56.226525    2432 start.go:218] Error updating cluster:  starting kubelet: Process exited with status 1

@uromahn
Copy link

uromahn commented Oct 12, 2017

@lilic It is working for me with the default virtualbox vm-driver. However, it still fails with xhyve on my Mac. I'd rather prefer to use xhyve since it is "leaner" than running a virtualbox VM.

Also, yes, I am using the latest minikube version v0.22.3. :)

@julianxhokaxhiu
Copy link

julianxhokaxhiu commented Nov 6, 2017

Trying it too on my Linux machine ( Arch Linux, with Kernel 4.13.11 ) I get this error:

$ journalctl -r
Nov 06 16:07:58 minikube kubelet[3308]: E1106 16:07:58.598601    3308 event.go:209] Unable to write event: 'Patch https://192.168.1.103:8443/api/v1/namespaces/default/events/minikube.14f486d28c2e1017: x509: certificate is valid for 127.0.0.1, 10.0.0.1, not 192.168.1.103'

by running this command

$ minikube start --vm-driver none --bootstrapper kubeadm
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.8.0
Downloading kubelet v1.8.0
Finished Downloading kubelet v1.8.0
Finished Downloading kubeadm v1.8.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...

and it hangs there.

Any idea what to do?


//EDIT: Solved using directly kubeadm init

@r2d4
Copy link
Contributor

r2d4 commented Nov 6, 2017

This is fixed at HEAD and will be in the next version of minikube

@F21
Copy link

F21 commented Dec 3, 2017

This is still failing for me on Windows 10 64-bit Creators Update with Minikube 0.24.1 and VirtualBox 5.2.2:

$ minikube start --kubernetes-version v1.8.4 --bootstrapper kubeadm
Starting local Kubernetes v1.8.4 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E1204 09:29:24.789321   14736 start.go:265] Error starting cluster:  kubeadm init error running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --skip-preflight-checks: Process exited with status 1

I deleted the cluster and tried again, but I still get the same error.

I tried k8s v1.8.0, but still get the same error:

$ minikube start --kubernetes-version v1.8.0 --bootstrapper kubeadm
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubelet v1.8.0
Downloading kubeadm v1.8.0
Finished Downloading kubeadm v1.8.0
Finished Downloading kubelet v1.8.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E1204 09:45:10.045589   16820 start.go:265] Error starting cluster:  kubeadm init error running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --skip-preflight-checks: Process exited with status 1
```

@sjezewski
Copy link

This still seems to be an issue.

I'm on ubuntu 16.04 w minikube 0.24.1 trying to run k8s 1.8.0

$sudo CHANGE_MINIKUBE_NONE_USER=true minikube start --vm-driver=none --kubernetes-version=v1.8.0 --bootstrapper kubeadm
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.8.0
Downloading kubelet v1.8.0
Finished Downloading kubelet v1.8.0
Finished Downloading kubeadm v1.8.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E1204 16:08:19.289580   14237 start.go:265] Error starting cluster:  kubeadm init error running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --skip-preflight-checks: running command: sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --skip-preflight-checks: exit status 1
$minikube version
minikube version: v0.24.1

Running w/o the none user flag produces a different error:

$sudo minikube start --vm-driver=none --kubernetes-version=v1.8.0 --bootstrapper kubeadm
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E1204 16:12:48.840173   20791 start.go:270] Error restarting cluster:  running cmd: 
sudo kubeadm alpha phase certs all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase kubeconfig all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase controlplane all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase etcd local --config /var/lib/kubeadm.yaml
: running command: 
sudo kubeadm alpha phase certs all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase kubeconfig all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase controlplane all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase etcd local --config /var/lib/kubeadm.yaml
: exit status 1

metacoma pushed a commit to metacoma/aws-minikube that referenced this issue Dec 7, 2017
@gdmello
Copy link

gdmello commented Jan 5, 2018

Had the same issue as @sjezewski, ^, was resolved by deleting the cluster and starting again.

@andyxning
Copy link
Member

but I think that is for the default localkube bootstrapper. with kubeadm you should be able to choose freely among released Kubernetes versions. And in fact it works fine for me with v1.7.6 and v1.7.7 as stated above, although these are not listed with minikube get-k8s-versions. But thanks for the heads-up :)

This should definitely be added to the doc. :)

@WhoisZihan
Copy link

Is there any better solution than deleting and restarting, which doesn't work for me? I have the same issue with @sjezewski on Ubuntu 16.04, no matter with kvm2/virtualbox/None driver.

I also tried specifying --kubernetes-version=v1.9.4, but not working. I can only start with --bootstrapper=localkube, other bootstrapper params never work...

@cmoulliard
Copy link

cmoulliard commented Dec 15, 2018

Why have you closed this ticket without really explaining the root cause, why we get the proc exit status 1

FYI: the problem still exist - #3455

minikube start --bootstrapper kubeadm
Starting local Kubernetes v1.13.0 cluster...
Starting VM...
Getting VM IP address...
E1215 09:43:21.117741   59734 start.go:210] Error parsing version semver:  Version string empty
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Stopping extra container runtimes...
Machine exists, restarting cluster components...
E1215 09:43:27.456132   59734 start.go:348] Error restarting cluster:  running cmd:
sudo kubeadm alpha phase certs all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase kubeconfig all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase controlplane all --config /var/lib/kubeadm.yaml &&
sudo /usr/bin/kubeadm alpha phase etcd local --config /var/lib/kubeadm.yaml
: Process exited with status 1

@MadhuraDhananjaya
Copy link

minikube start

  • minikube v1.1.1 on windows (amd64)

! Ignoring --vm-driver=virtualbox, as the existing "minikube" VM was created using the hyperv driver.
! To switch drivers, you may create a new VM using minikube start -p <name> --vm-driver=virtualbox
! Alternatively, you may delete the existing VM using minikube delete -p minikube

  • Restarting existing hyperv VM for "minikube" ...
    E0719 09:41:14.409440 12296 start.go:529] StartHost: start: exit status 1

X Unable to start VM: start: exit status 1

minikube status
host:
kubelet:
apiserver:
kubectl:

The values for minikube status remains empty.

What would be the problem for this? How do I resolve it.
Thanks in advance.

@MadhuraDhananjaya
Copy link

minikube stop

  • Stopping "minikube" in hyperv ...
  • Stopping "minikube" in hyperv ...
  • Stopping "minikube" in hyperv ...
  • Stopping "minikube" in hyperv ...
  • Stopping "minikube" in hyperv ...

X Unable to stop VM: Temporary Error: Stop: minikube: exit status 1
Temporary Error: Stop: minikube: exit status 1
Temporary Error: Stop: minikube: exit status 1
Temporary Error: Stop: minikube: exit status 1
Temporary Error: Stop: minikube: exit status 1

  • Sorry that minikube crashed.

How do I resolve this. Minikube is either starting nor stopping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests