I\'m following that tutorial (https://www.baeldung.com/spring-boot-minikube) I want to create Kubernetes deployment in yaml file (simple-crud-dpl.yaml):
apiV
I was getting below error while running kubectl explain pod
on windows 10
error: SchemaError(io.k8s.api.core.v1.NodeCondition): invalid object doesn't have additional properties
I had both Minikube and Docker Desktop installed. Reason for this error, as mentioned in earlier answers as well, was mismatch between server (major 1 minor 15) and client version (major 1 minor 10). Client version was coming from Docker Desktop. To fix I upgraded kubectl client version to v1.15.1 as described here
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.15.1/bin/windows/amd64/kubectl.exe
You can use "--validate=false" in your command. For example:
kubectl create -f simple-crud-dpl.yaml --validate=false
I second @rennekon's answer. I found that I had docker running on my machine which also installs kubectl
. That installation of kubectl causes this issue to show.
I took the following steps:
brew uninstall kubectl
brew install kubectl
brew link --overwrite kubernetes-cli
I was then able to run my kubectl apply
commands successfully.
On windows 10.0, uninstalling Docker helped me get away this problem. Doing with kubectl and minikube.
I am on Windows 10 with Docker Client and Minikube both installed. I was getting the error below;
error: SchemaError(io.k8s.api.core.v1.Node): invalid object doesn't have additional properties
I resolved it by updating the version of kubectl.exe to that being used by minikube. Here are the steps:
Note: Minikube tends to use the latest version of Kubernetes so it will be advisable to grab the latest kubectl.
Download the matching version of kubectl.exe.
Navigate to your Docker path where your kubectl is located e.g.
C:\Program Files\Docker\Docker\resources\bin
Place your downloaded kubectl.exe there. If it asks you replace it, please do.
Now type refreshenv
in Powershell.
Check the new version if it's what you have placed there; kubectl version
.
Now you are good, retry whatever tasks you was doing.
I don't think the problem is with imagePullPolicy
, unless you don't have the image locally. The error is about autoscaling
, which means it's not able to create replicas of the container.
Can you set replicas: 1
and give it a try?