This is a...
Problem:
web.yaml and webp.yaml files give the next error when tries to create the _statefulSet_:
$ kubectl create -f web.yaml
service "nginx" created
Error from server (BadRequest): error when creating "web.yaml": StatefulSet in version "v1" cannot be handled as a StatefulSet: no kind "StatefulSet" is registered for version "apps/v1"
Proposed Solution:
It works if we change apiVersion value from apps/v1 to apps/v1beta2.
If you confirm it's right I can send a PR.
Page to Update:
http://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T21:12:46Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4", GitTreeState:"clean", BuildDate:"2017-11-29T22:43:34Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"linux/amd64"}
I can open a PR if you confirm me I'm setting the right value for apiVersion.
It works if we change
apiVersionvalue fromapps/v1toapps/v1beta2.
The server version is v1.8.0 in which StatefulSet is still in beta. Guess the yaml files you used are for v1.9.x.
@islinwb You're right, it was the problem 👍
I'm close the issue and I'll verify the others that I opened yesterday (maybe it's the same problem).
Thanks
Hi all When i am trying for statfulset
_"apiVersion: apps/v1beta2"_ i am getting the same error but if i changed from apps/v1beta2 to _"apps/v1beta1"_ its working fine
Thanks
Most helpful comment
Hi all When i am trying for statfulset
_"apiVersion: apps/v1beta2"_ i am getting the same error but if i changed from apps/v1beta2 to _"apps/v1beta1"_ its working fine
Thanks