I am a regular user of Docker since a few years and I have the Docker service installed and running locally on my Win10Pro host. It works well. Now I want to get started with Kubernetes so I used the gcloud command-line installation to install Kubernetes and got the following message:
WARNING: There are older versions of Google Cloud Platform tools on your system PATH. Please remove the following to avoid accidentally invoking these old tools:
C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe
Looks like my Docker installation brought in another version of kubectl which Google advises me to delete. Should I really just delete the file from my Docker installation?
There appears to be two versions of kubectl.exe installed now, one which came with Docker and one which I just installed from Google. Kubernetes in the Docker GUI is not enabled. Should I enable it in the Docker settings GUI?
After a while I tried to install Minikube and start it which results in the following output:
C:\WINDOWS\system32>minikube start
* minikube v1.5.2 on Microsoft Windows 10 Pro 10.0.17763 Build 17763
E1114 05:07:00.856628 3836 driver_windows.go:74] Can't find VirtualBox registry entries, is VirtualBox really installed properly? The system cannot find the file specified.
* Automatically selected the 'hyperv' driver
* Creating hyperv VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
* Preparing Kubernetes v1.16.2 on Docker '18.09.9' ...
* Pulling images ...
* Launching Kubernetes ...
* Waiting for: apiserver
* Done! kubectl is now configured to use "minikube"
! C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe is version 1.14.7, and is incompatible with Kubernetes 1.16.2. You will need to update C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe or use 'minikube kubectl' to connect with this cluster
C:\WINDOWS\system32>
But despite the above message, I can run and expose a service as expected:
C:\WINDOWS\system32>kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10
deployment.apps/hello-minikube created
C:\WINDOWS\system32>kubectl expose deployment hello-minikube --type=NodePort --port=8080
service/hello-minikube exposed
C:\WINDOWS\system32>kubectl get pod
NAME READY STATUS RESTARTS AGE
hello-minikube-797f975945-tj4g6 1/1 Running 0 13s
C:\WINDOWS\system32>minikube service hello-minikube --url
http://172.17.100.11:30575
C:\WINDOWS\system32>
The service does show its output at the above url. Do you think that my installation and configuration of Kubernetes is alright or is there something that I need to fix? Did I do this correctly?
I did not remove the kubectl.exe from the Docker installation and I installed Minikube without being adviced to do it but it seems correct. What's peculiar is that the client and the server now show different versions:
C:\WINDOWS\system32>kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.7", GitCommit:"8fca2ec50a6133511b771a11559e24191b1aa2b4", GitTreeState:"clean", BuildDate:"2019-09-18T14:47:22Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
C:\WINDOWS\system32>