Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue in launching minikube on mac

I am new to Kubernetes. I am trying to launch a kubernetes cluster in my local mac machine. I am using following command to launch Kubernetes:

minikube start --vm-driver=hyperkit

I am getting following error:

/usr/local/bin/kubectl is version 1.14.7, and is incompatible with Kubernetes 1.17.0. 
You will need to update /usr/local/bin/kubectl or use 'minikube kubectl' to connect with this cluster

Now while executing following command:

minikube kubectl

It is not doing anything, just showing basic commands along with their usages.

And while trying to upgrade kubetctl it is showing it is already up to date.

I have not found any solution for this. Any idea regarding how to fix this ?

like image 392
Joy Avatar asked Dec 17 '19 13:12

Joy


2 Answers

If you have already upgraded and got the same error, try below

brew link --overwrite kubernetes-cli
like image 98
erncnerky Avatar answered Sep 20 '22 23:09

erncnerky


The best solution for you is to update kubectl manually. To perform this you need to download the binary:

https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/darwin/amd64/kubectl

Change permissions of kubectl to be executable:

$ chmod +x ./kubectl 

And move to /usr/local/bin/ overwriting the old one.

$ sudo mv ./kubectl $(which kubectl)

To check the effects, run:

$ kubectl version
like image 35
Mark Watney Avatar answered Sep 21 '22 23:09

Mark Watney