CSINodeDriver invalid object doesn't have additional properties

4/19/2019

I am new to Kubernetes and Minikube. I was trying to run kubectl apply -f ./deployment.yaml

I tried to put version apps/v1beta1 as the error showed, but it's still wrong.

Error: error: SchemaError(io.k8s.api.storage.v1beta1.CSINodeDriver): invalid object doesn't have additional properties

Here's my yaml file:

apiVersion: apps/v1beta2
kind: Deployment
metadata:
  name: tomcat-deployment
spec:
  selector:
    matchLabels:
      app: tomcat
  replicas: 1
  template:
    metadata:
      labels:
        app: tomcat
    spec:
      containers:
        - name: tomcat
          image: tomcat:9.0
          ports:
            - containerPort: 8080

Expected output:

deployment "tomcat-deployment" created

-- Jaronloch
kubernetes

1 Answer

4/19/2019

tl;dr

It's a version issue. I had 1.10, and the working is 1.14.


Apparently the kubectl version of my mac is 1.10.

I tried to see if I can do a brew install kubectl and it said that I already have kubectl.

Warning: kubernetes-cli 1.14.0 is already installed, it's just not linked
You can use `brew link kubernetes-cli` to link this version.

To force the link and overwrite all conflicting files:
  brew link --overwrite kubernetes-cli

I saw that the current version in my local is 1.10. and homebrew is saying 1.14

I overwrote the symlink via brew link, and it worked.

-- Jaronloch
Source: StackOverflow