Skip to content
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

Merged
merged 3 commits into from
Feb 8, 2019
Merged

Adding container state details to documentation #12512

merged 3 commits into from
Feb 8, 2019

Conversation

rajeshdeshpande02
Copy link
Contributor

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 5, 2019
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 5, 2019
@netlify
Copy link

netlify bot commented Feb 5, 2019

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 6ff188f

https://deploy-preview-12512--kubernetes-io-master-staging.netlify.com

@Rajakavitha1
Copy link
Contributor

/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.
Copy link
Contributor

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."

Copy link
Contributor Author

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.
Copy link
Contributor

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:"

Copy link
Contributor Author

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.
Copy link
Contributor

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:"

Copy link
Contributor Author

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.
Copy link
Contributor

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:"

Copy link
Contributor Author

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

@ryanmcginnis
Copy link
Contributor

ryanmcginnis commented Feb 7, 2019

(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.)

@ryanmcginnis
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2019
@k8s-ci-robot k8s-ci-robot merged commit 731257d into kubernetes:master Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants