cloudnativedevops / demo

Simple demonstration app for 'Cloud Native Devops'
MIT License
799 stars 517 forks source link

error: unable to recognize "k8s/deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1" #32

Closed iamayushdas closed 4 years ago

iamayushdas commented 4 years ago

May i know how to resolve this error from

I tried this code..

sed -i s#IMAGE_HERE#gcr.io/$GOOGLE_CLOUD_PROJECT/valkyrie-app:v0.0.1#g k8s/deployment.yaml

gcloud container clusters get-credentials valkyrie-dev --zone us-east1-d

kubectl create -f k8s/deployment.yaml

kubectl create -f k8s/service.yaml

And ended up receiving this error below

error: unable to recognize "k8s/deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"

Screenshot below

Screenshot from 2020-10-06 11-41-45

bitfield commented 4 years ago

Resolve what?

bagladivyang03 commented 4 years ago

@bitfield kubectl create -f k8s/deployment.yaml

error: unable to recognize "k8s/deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"

Getting this So pls tell how to resolve this :)

bagladivyang03 commented 4 years ago

@bitfield Below is the Deployment.yaml code :-

kind: Deployment apiVersion: extensions/v1beta1 metadata: name: valkyrie-dev spec: replicas: 1 template: metadata: name: valkyrie-app labels: app: valkyrie-app role: frontend-backend env: dev spec: containers:

Pls tell asap :)

moth commented 4 years ago

Resolve this!

@iamayushdas you seem like a smart individual on a path of learning - you've found the best book on Kubernetes after all. It is also important to hone the softer skills like how to collaborate - by remaining polite, explaining the issue clearly, and being respectful of people's time. There's great benefits to be had.

bagladivyang03 commented 4 years ago

@moth sir pls tell how to resolve the issue I explained above

bitfield commented 4 years ago

Have you checked the 'Known issues' list in the README? Specifically, https://github.com/cloudnativedevops/demo#apiversion

bagladivyang03 commented 4 years ago

thanks @bitfield will try again and let u know asap :)

iamayushdas commented 4 years ago

Have you checked the 'Known issues' list in the README? Specifically, https://github.com/cloudnativedevops/demo#apiversion

I tried this. But ended up in having error

error: error validating "k8s/deployment.yaml": error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation offwith --validate=false

iamayushdas commented 4 years ago

resolved!

iamayushdas commented 4 years ago

Resolved!