-
Notifications
You must be signed in to change notification settings - Fork 15k
Add init container documentation #679
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
Add init container documentation #679
Conversation
c822d88
to
47d7b09
Compare
Automatic merge from submit-queue Proposal for implementing init containers Addresses #1589. Implemented in #23567. Docs in kubernetes/website#679 ```release-note Init containers enable pod authors to perform tasks before their normal containers start. Each init container is started in order, and failing containers will prevent the application from starting. ```
@smarterclayton do we expect the usage to change a lot come beta? |
Expect? No. Maybe some tweaks to which features are supported, and the fact that it would not be using annotations. |
@smarterclayton The annotations was mainly what I was asking about. |
Excellent work, thanks @smarterclayton ! And thanks for the tech review, @pwittrock :) |
|
||
Kubernetes now includes an alpha feature known as **init containers**, which are one or more containers in a pod that get a chance to run and initialize shared volumes prior to the other application containers starting. An init container is exactly like a regular container, except that it always runs to completion and each init container must complete successfully before the next one is started. If the init container fails (exits with a non-zero exit code) on a `RestartNever` pod the pod will fail - otherwise it will be restarted until it succeeds or the user deletes the pod. | ||
|
||
Since init containers are an alpha feature, they are specified by setting the `pod.alpha.kubernetes.io/init-containers` annotation on a pod (or replica set, deployment, daemon set, pet set, or job). The value of the annotation must be a string containing a JSON array of container definitions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string containing a JSON array of container definitions
I don't suppose it also supports YAML?
In helm chart for v2.7.0 variable names changed form ```Namespace``` to ```namespace``` and ```InstallNamespace``` to ```installNamespace``` Signed-off-by: Aliaksei Burau <aliakseiburov@gmail.com>
Resolves kubernetes/kubernetes#1589