gdcc/dataverse-kubernetes

error validating data: apiVersion not set (apiversion already set to v1)

Danish864 opened this issue · 1 comments

I am a student and new to minikube as well as linux. My Teacher did the same and his pod created but i get error. I don't know what is the problem. Should i ignore validation error?

kubectl create -f myfirstpod.yaml
error: error validating "myfirstpod.yaml": error validating data: apiVersion not set; if you choose to ignore these errors, turn validation off with --validate=false

cat myfirstpod.yaml
kind: Pod
apiversion: v1
metadata:
name: myfirstpod
spec:
containers:

  • name: container1
    image: aamirpinger/helloworld:latest
    ports:
    • containerPort: 80

minikube version: v1.11.0
kubectl is version 1.8.4
Kubernetes 1.18.3
Docker 19.03.11

I am a student and new to minikube as well as linux. My Teacher did the same and his pod created but i get error. I don't know what is the problem. Should i ignore validation error?

kubectl create -f myfirstpod.yaml
error: error validating "myfirstpod.yaml": error validating data: apiVersion not set; if you choose to ignore these errors, turn validation off with --validate=false

cat myfirstpod.yaml
kind: Pod
apiversion: v1
metadata:
name: myfirstpod
spec:
containers:

  • name: container1
    image: aamirpinger/helloworld:latest
    ports:

    • containerPort: 80

minikube version: v1.11.0
kubectl is version 1.8.4
Kubernetes 1.18.3
Docker 19.03.11

i am sorry . i posted this issue in other branch. I am closing this issue here and opening in minikube.