Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apiVersion: extensions/v1beta1 errors #14

Closed
thescott opened this issue Oct 27, 2019 · 4 comments
Closed

apiVersion: extensions/v1beta1 errors #14

thescott opened this issue Oct 27, 2019 · 4 comments

Comments

@thescott
Copy link

Hello there
I am writing to reference
demo/hello-k8s/k8s/deployment.yaml
The apiVersion is extensions/v1beta1 which when I try kubectl apply -f with this yaml file I get an error
error: unable to recognize "k8s/deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
I am using minikube on a MacMini

kubectl version
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.7", GitCommit:"8fca2ec50a6133511b771a11559e24191b1aa2b4", GitTreeState:"clean", BuildDate:"2019-09-18T14:47:22Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:27:17Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

I was able to resolve by changing the the apiVersion to
apiVersion: apps/v1
I can perform a pull request if you find that to be helpful, thank you I am enjoying the book :D

@bitfield
Copy link
Contributor

Hey @thescott, thanks a lot! Very helpful bug report. This is to be expected since Deployments were deprecated out of extensions/v1beta1 in the recent Kubernetes update.

We debated whether to make all our examples use apps/v1, but at the time, there were many Kubernetes installations which were too old to support this. Time moves on, so in the next edition of the book, should there be one, we'll target apps/v1! Meanwhile, we'll make the change in the online examples.

@domingusj
Copy link
Contributor

Thanks for opening the issue @thescott! Here is a PR to update the examples: #15

@thescott
Copy link
Author

Excellent thank you @domingusj

@thescott
Copy link
Author

Forgot to close this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants