Kubernetes Status

Kubernetes Status

This section describes how to get the pod status for the default namespace, the pod status for storage, and the node status.

Pod Status For Default Namespace

Check the status of application pods within the default namespace. All pods should show as ready and
Running
.
kubectl get pods -n default
The output displays a table of all pods.
Pod Status
NAME
READY
STATUS
RESTARTS
AGE
<pod name>
<n>/<n>
Running
<number of restarts>
<age>
The following explains each of the columns in the output.
Pod Status Columns
Column
Description
NAME
The unique name of the pod.
READY
The number of containers in the pod that are ready. For example, 1/1 indicates that all containers in the pod are ready and running, whereas 1/2 indicates that only 1 is running.
STATUS
The current execution of the status (such as Pending, Running, Succeeded, Failed, Completed or Unknown).
RESTARTS
The number of times the Pod has restarted. It will indicate the pod’s stability and the occurrence of any issues that might have initiated the restart.
AGE
The time when pod was created.
The following explains common pod STATUS states.
Pod Status States
State
Description
Pending
The pod has been accepted by the Kubernetes cluster, but one or more of the containers has not been set up and made ready to run. This includes time a pod spends waiting to be scheduled as well as the time spent downloading container images over the network. If the node is stuck in this state, generally this is because there are insufficient resources (CPU/Mem), or because the images are being downloaded. The output of
kubectl describe <pod name>
should provide messages from the scheduler about why it can not schedule the pod.
Running
Pod is actively running on a node, with at least one container running.
Succeeded
All containers in the pod have terminated successfully and will not be restarted.
Failed
One or more containers in the pod have terminated with a non-zero exit status, or a container failed to restart.
Unknown
Pod state is not known to the controller, usually because of a communication issue between the node and the Kubernetes API.
ContainerCreating
If a pod gets stuck with this message, a common cause is that an image did not fully download. To get more information about this state, run:
kubectl describe pod <pod name> -n <namespace>
If it is not fully downloaded, wait. If the problem does not resolve itself, contact Zebra support. If there is grafana pod and it reports ContainerCreating, ignore it.
Init:N/M
Pod status
Init:N/M
means one init container is not finalized;
init:N/M
means the pod has
M
Init containers, and
N
have completed so far. To get more information, use the following commands:
  • kubectl describe pods
  • kubectl logs
  • kubectl logs -c init-container-xxx
CreateContainerConfigError
When the configuration specified for a container in a pod is not correct or is missing a vital part. For example, there is a missing persistent volume, ConfigMaps, or secret. You can attempt to determine the cause by describing the pod, with the command:
kubectl describe pod -n <namespace> <podname>
CreateContainerError
This is a problem happening at a later stage in the container creation flow. Kubernetes displays this error when it attempts to create the container in the pod.

Pod Status for Storage

If you are using multi-node deployments, check the status of storage pods in the
rook-ceph
namespace. All pods should show as ready and
Running
, with the exception of
rook-ceph-osd-prepare
, which will be
Completed
.
kubectl get pods -n rook-ceph
Add the
-o wide
option in the
kubectl get pods
command above to show the pod status and which pods are running on individual nodes.

Node Status

Check the status of nodes. All nodes should show
Ready
.
kubectl get nodes
The output displays a table of all nodes.
Node Status
NAME
STATUS
ROLES
AGE
VERSION
<node name>
Ready
none
<age>
<version>
The following table explains each of the columns in the output.
Node Status Columns
Column
Description
NAME
The name of the node within the cluster.
STATUS
The current status of the node, indicating whether it is ready, not ready, or unreachable.
ROLES
Any roles assigned to the node, such as master, worker, etc.
AGE
The duration since the node was created or added to the cluster.
VERSION
The Kubernetes version is running on the node.
The following table explains the node STATUS states.
Node STATUS States
State
Description
Ready
Healthy node.
NotReady
Node down or unreachable. This can be caused by a communication issue or node failure.
Ready, SchedulingDisabled
Node cordoned. This is the outcome of running
kubectl cordon
or
kubectl drain
, which prevents a node from scheduling new pods. Outside of maintenance, this is typically not desired. To uncordon (tell the node to resume scheduling), run
kubectl uncordon
.