-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Adding container state details to documentation #12512
Conversation
Deploy preview for kubernetes-io-master-staging ready! Built with commit 6ff188f https://deploy-preview-12512--kubernetes-io-master-staging.netlify.com |
/assign @ryanmcginnis |
@@ -158,6 +158,41 @@ and | |||
Note that the information reported as Pod status depends on the current | |||
[ContainerState](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#containerstatus-v1-core). | |||
|
|||
## Container States | |||
|
|||
Once pod is assigned to a node by scheduler, kubelet starts creating container using container runtime.There are three possible states of containers, i.e Waiting, Running and Terminated. To check state of container, you can use `kubectl describe pod` command. State will be displayed for each container within that pod. |
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.
Change to:"
"Once a Pod is assigned to a node by the scheduler, kubelet starts creating containers using the container runtime. There are three possible states of containers: Waiting, Running, and Terminated. To check the state of a container, you can run kubectl describe pod [POD_NAME]
. State is displayed for each container within that Pod."
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.
Suggested changes are committed. Please check
|
||
Once pod is assigned to a node by scheduler, kubelet starts creating container using container runtime.There are three possible states of containers, i.e Waiting, Running and Terminated. To check state of container, you can use `kubectl describe pod` command. State will be displayed for each container within that pod. | ||
|
||
* `Waiting`: This is default state of container. If container is not in running or terminated state, it is in waiting state. In this state container is still creating and doing all required things like pulling images, applying secrets etc. |
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.
Change to:
"* Waiting
: Default state of a container. If a container is not in either Running or Terminated state, it is in waiting state. A container in Waiting state still runs its required operations, like pulling images, applying Secrets, etc.
Along with this state, a message and reason about the state are displayed to provide more information:"
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.
Suggested changes are committed. Please check
... | ||
``` | ||
|
||
* `Running`: Running state indicate that container is executing without any issue. Once container enters into running state, `postStart` hook (if any) will be executed. This state also displays the time from which it is in running state i.e.start time. |
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.
Change to:
"* Running
: Indicates that the container is executing without issues. Once a container enters into Running, postStart
hook (if any) is executed. This state also displays the time when the container entered Running state:"
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.
Suggested changes are committed. Please check
... | ||
``` | ||
|
||
* `Terminated`: This state indicate that container completed its execution. Container can enter into this state either because it completed execution successfully or it failed due to some reason. Appropriate information with reason and exit code will be displayed for this state. It also displays start and finish time for container. Before container enters into terminated state `preStop` hook (if any) will be executed. |
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.
Change to:
"* Terminated
: Indicates that the container completed its execution and has stopped running. A container enters into this when it has successfully completed execution or when it has failed for some reason. Regardless, a reason and exit code is displayed, as well as the container's start and finish time. Before a container enters into Terminated, preStop
hook (if any) is executed:"
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.
Suggested changes are committed. Please check
(just following up to say that i hope i didn't come across as too directive in my feedback. i'm a little ignorant to reviewing in open source, but i'm trying to adjust my style. :) thanks.) |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ryanmcginnis The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adding container state details to documentation as it was not present earlier. Also this is important to understand container state in order to understand pod life cycle.