⎈ k8s knowledge compiler

Node Status [page]deterministic

reference

The status of a [node](/docs/concepts/architecture/nodes/) in Kubernetes is a critical aspect of managing a Kubernetes cluster. In this article, we'll cover the basics of monitoring and maintaining node status to ensure a healthy and stable cluster.

## Node status fields

A Node's status contains the following information:

* [Addresses](#addresses) * [Conditions](#condition) * [Capacity and Allocatable](#capacity) * [Info](#info) * [Declared Features](#declaredfeatures)

You can use `kubectl` to view a Node's status and other details:

```shell kubectl describe node <insert-node-name-here> ```

Each section of the output is described below.

## Addresses

The usage of these fields varies depending on your cloud provider or bare metal configuration.

* HostName: The hostname as reported by the node's kernel. Can be overridden via the kubelet `--hostname-override` parameter. * ExternalIP: Typically the IP address of the node that is externally routable (available from outside the cluster). * InternalIP: Typically the IP address of the node that is routable only within the cluster.

## Conditions {#condition}

The `conditions` field describes the status of all `Running` nodes. Examples of conditions include:

| Node Condition | Description | |----------------------|-------------| | `Ready` | `True` if the node is healthy and ready to accept pods, `False` if the node is not healthy and is not accepting pods, and `Unknown` if the node controller has not heard from the node in the last `node-monitor-grace-period` (default is 50 seconds) | | `DiskPressure` | `True` if pressure exists on the disk size—that is, if the disk capacity is low; otherwise `False` | | `MemoryPressure` | `True` if pressure exists on the node memory—that is, if the node memory is low; otherwise `False` | | `PIDPressure` | `True` if pressure exists on the processes—that is, if there are too many processes on the node; otherwise `False` | | `NetworkUnavailable` | `True` if the network for the node is not correctly configured, otherwise `False` |

> Note: If you use command-line tools to print details of a cordoned Node, the Condition includes `SchedulingDisabled`. `SchedulingDisabled` is not a Condition in the Kubernetes API; instead, cordoned nodes are marked Unschedulable in their spec.

In the Kubernetes API, a node's condition is represented as part of the `.status` of the Node resource. For example, the following JSON structure describes a healthy node:

```json "conditions": [ { "type": "Ready", "status": "True", "reason": "KubeletReady", "message": "kubelet is posting ready status", "lastHeartbeatTime": "2019-06-05T18:38:35Z", "lastTransitionTime": "2019-06-05T11:41:27Z" } ] ```

When problems occur on nodes, the Kubernetes control plane automatically creates [taints](/docs/concepts/scheduling-eviction/taint-and-toleration/) that match the conditions affecting the node. An example of this is when the `status` of the Ready condition remains `Unknown` or `False` for longer than the kube-controller-manager's `NodeMonitorGracePeriod`, which defaults to 50 seconds. This will cause either an `node.kubernetes.io/unreachable` taint, for an `Unknown` status, or a `node.kubernetes.io/not-ready` taint, for a `False` status, to be added to the Node.

These taints affect pending pods as the scheduler takes the Node's taints into consideration when assigning a pod to a Node. Existing pods scheduled to the node may be evicted due to the application of `NoExecute` taints. Pods may also have [tolerations](#gloss:toleration) that let them schedule to and continue running on a Node even though it has a specific taint.

See [Taint Based Evictions](/docs/concepts/scheduling-eviction/taint-and-toleration/#taint-based-evictions) and [Taint Nodes by Condition](/docs/concepts/scheduling-eviction/taint-and-toleration/#taint-nodes-by-condition) for more details.

## Capacity and Allocatable {#capacity}

…(trimmed)

Sources

reference/node/node-status.md · docNode Status

Related (10)

references Tolerationtolerations conf=1
references Namespacenamespace conf=1
part_of Node status fieldsdescribes conf=1
part_of Addressesdescribes conf=1
part_of Conditions {#condition}describes conf=1
part_of Capacity and Allocatable {#capacity}describes conf=1
part_of Infodescribes conf=1
part_of Declared features {#declaredfeatures}describes conf=1
part_of Heartbeatsdescribes conf=1
api_for Nodedocuments API object conf=1

← all Docs