I'm using kubernetes v1.5.2 and I wanted to use a statefulSet that contains the initContainer
spec. When trying to create the statefulSet I got the message:
error validating "my-statefulSet.yaml": error validating data: found invalid field initContainers for v1.PodSpec; if you choose to ignore these errors, turn validation off with --validate=false
I believe that this spec is not available for the version that I am using. So is there anything similar for my version that I can use or is my only option to move the config under the containers
spec? When I move the spec over to containers
I get the issue of the persistentVolumes not being ready on time for the pods.
Take a look at Kubernetes Deployments and Init Containers you have an example of init containers defined via beta annotation