1

I have downloaded Kubernetes latest version from Kubernetes official site and referenced it in the PATH above the reference for Docker but It is still showing the version installed with Docker Desktop.

I understand that docker comes with Kubernetes installed out of the box but the docker version '1.15.5' doesn't work correctly with my Minikube version which is 'v1.9.2' which is causing me problems.

any suggestions on how to fix this issues? should I remove the Kubernetes binary from C:\Program Files\Docker\Docker\resources\bin I don't think that will be a good idea.

Can someone help me tackle this issue, along with some explanation on how the versions work with each other? Thanks

2
  • My answer helped you? If yes, consider accepting and upvoting it. Commented Apr 22, 2020 at 22:21
  • 1
    @mWatney Thanks for taking out the time to answer and Yes it helped. upvoting and accepting it so more people may get help :) Commented Apr 23, 2020 at 14:08

1 Answer 1

1

This is happening because windows always give you the first comment found in the PATH, both kubectl versions (Docker and yours) are in the PATH but Docker PATH in being referenced before your kubectl PATH.

To solve this really depends on what you need. If you are not using your Docker Kubernetes you have two alternatives:

1 - Fix your PATH and make sure that your kubectl PATH is referenced before Docker PATH.

2 - Replace Docker kubectl to yours.

3- Make sure you restart your PC after doing these changes, as kubectl will automatically update the configuration to point to the newer kubectl version the next time you use the minikube start command with a correct --kubernetes-version:

If you are using both from time to time, I would suggest you to create a script that will change your PATH according to your needs.

According to the documentation you must use a kubectl version that is within one minor version difference of your cluster. For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master. Using the latest version of kubectl helps avoid unforeseen issues.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.