How can I test init-container?

433 views
Skip to first unread message

har...@hyper.sh

unread,
May 31, 2016, 5:36:59 AM5/31/16
to kubernetes-dev
Hi guys,

Since https://github.com/kubernetes/kubernetes/pull/23567 has been shipped, how can I use init-containers?

v1 api does not contain this feature. I tested it against `hack/local-cluster-up.sh` btw.

 ./cluster/kubectl.sh create -f ~/pod.yaml

error validating "/
root/pod.yaml": error validating data: found invalid field initContainers for v1.PodSpec; if you choose to ignore these errors, turn validation off with --validate=false


Clayton Coleman

unread,
May 31, 2016, 10:19:05 AM5/31/16
to har...@hyper.sh, kubernetes-dev
Init containers are set as annotations. The annotation key is "pod.alpha.kubernetes.io/init-containers" and the value is a JSON array of Container definitions (like pod.spec.containers).

The status of an init container is also an annotation and is ".../init-container-statuses"
--
You received this message because you are subscribed to the Google Groups "kubernetes-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-de...@googlegroups.com.
To post to this group, send email to kuberne...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/c690097a-1c49-4d69-8d3e-53d6adb384b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages