Search code examples
kubectlminikube

minikube kubectl client and server version mismatch


When I run the command:

kubectl create -f deployment-account.yaml

I get the error:

SchemaError(io.k8s.api.core.v1.Event): invalid object doesn't have additional properties

I understand this to be a version mismatch but I have tried to update the version but there are the fixes I found are only for linux ie. using brew

kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:45:25Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}

I have tried delete my minikube. but it is still the same.

My setup is using docker-desktop hyper-v. I tried to update minikube kubernetes-cli from choco but the version doesnt change in kubectl.


Solution

  • Your version of kubectl is conflicting with the one provided by the docker-desktop.

    You can solve this conflict by moving the path entry for Chocolatey to be above the entry for docker.

    Use Get-Command kubectl in a Powershell to check if the path is correct.