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

Issue with k8s.io/docs/concepts/workloads/controllers/deployment/ #5818

Closed
1 of 2 tasks
AlainODea opened this issue Oct 9, 2017 · 5 comments
Closed
1 of 2 tasks

Issue with k8s.io/docs/concepts/workloads/controllers/deployment/ #5818

AlainODea opened this issue Oct 9, 2017 · 5 comments

Comments

@AlainODea
Copy link

AlainODea commented Oct 9, 2017

This is a...

  • Feature Request
  • Bug Report

Problem:

nginx-deployment.yaml used in example yields error message error validating data: unknown object type when used with minikube version: v0.22.0 on macOS Sierra (10.12.6). It's possible that this is a minikube-specific issue. If so, please close this immediately noting that for future travellers :)

kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/concepts/workloads/controllers/nginx-deployment.yaml
error: error validating "https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/concepts/workloads/controllers/nginx-deployment.yaml": error validating data: unknown object type schema.GroupVersionKind{Group:"apps", Version:"v1beta2", Kind:"Deployment"}; if you choose to ignore these errors, turn validation off with --validate=false

Proposed Solution:

None that I can find.

I tried the workaround mentioned in the error (--validate=false) and repeated by @hanks in kubernetes/kubernetes #53309 and got a different error: no kind "Deployment" is registered for version "apps/v1beta2.

Page to Update:
http://kubernetes.io/docs/concepts/workloads/controllers/deployment/

Kubernetes Version

$ kubectl version Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4", GitTreeState:"clean", BuildDate:"2017-10-05T00:40:04Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-09-07T18:20:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

Additional Information

I'm deliberately not using code blocks because the lines are long and horizontal scrolling is not fun.

Here's a transcript of my attempt to deploy nginx following the guide with minikube as the server:

$ kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/concepts/workloads/controllers/nginx-deployment.yaml
error: error validating "https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/concepts/workloads/controllers/nginx-deployment.yaml": error validating data: unknown object type schema.GroupVersionKind{Group:"apps", Version:"v1beta2", Kind:"Deployment"}; if you choose to ignore these errors, turn validation off with --validate=false

$ kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/concepts/workloads/controllers/nginx-deployment.yaml --validate=false
Error from server (BadRequest): error when creating "https://raw.githubusercontent.com/kubernetes/kubernetes.github.io/master/docs/concepts/workloads/controllers/nginx-deployment.yaml": Deployment in version "v1beta2" cannot be handled as a Deployment: no kind "Deployment" is registered for version "apps/v1beta2"

Caveat

This could easily be minikube-specific. Please close and note that if it is.

@AlainODea
Copy link
Author

I did some further research. This is a known issue between kubectl 1.8 and minikube 0.22.0 (and possibly later versions) and is minikube-specific:
Kubectl 1.8 does not work with minikube
Kubectl 1.8 broken for minikube - OpenAPI swagger file doesn't include x-kubernetes-group-version-kind

The fix is in progress. The documentation is fine. I'm closing this and investigating an option for installing an earlier kubectl as a workaround.

@JCzz
Copy link

JCzz commented Dec 15, 2017

I just got the same issue running Kubernetes on Google following this example: https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/

kubectl create -f mysql-deployment.yaml

service "mysql" created
persistentvolumeclaim "mysql-pv-claim" created
error: error validating "mysql-deployment.yaml": error validating data: unknown object type schema.GroupVersionKind{Group:"apps", Version:"v1beta2", Kind:"Deployment"}; if you choose to ignore these errors, turn validation off with --validate=false

@tommysvensson0
Copy link

@JCzz Have you gotten through that? I'm having the exact same issue with the exact same application and can't figure out why.

@JCzz
Copy link

JCzz commented Dec 21, 2017

Hi tommysvensson0
Nope, that one is still not clear to me. But I have a Scylla(Cassandra like db) database running with PersistentVolume.

@tommysvensson0
Copy link

@JCzz I figured out that I had an older version of kubernetes api on my server (default in google cloud) and got it working.
changed from this:
apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1
to this:
apiVersion: apps/v1beta1 # for versions before 1.8.0 use apps/v1beta1

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