A Kubernetes Node is a logical collection of IT resources that supports one or more containers. Nodes contain the necessary services to run Pods (which are Kubernetes's units of containers), communicate with master components, configure networking and run assigned workloads. A Node can host one or multiple Pods. Each Kubernetes Node has services to create the runtime environment and support Pods. These components include Docker, kube-proxy and kubelet.
Kubernetes choreographs the deployment and scaling of applications in containers, rather than the deployment and scaling of necessary hardware systems. Nodes are collections of resources defined by the hosting infrastructure, whether that is on a cloud provider or as physical or virtual machines (VMs). The host environment of a Node can be specially tailored for the applications, but this is not required. Kubernetes creates Node objects that represent a Node and then ensures proper functionality. Pods run on Nodes that have the appropriate available resources for the workload, and meet the Pod's requirements for affinity/anti-affinity with other Pods.
Three components interact in Kubernetes Node interfaces: kubectl, kubelet and the Node Controller.
The Node Controller manages aspects of the Node throughout its life. The controller's first task is to assign a Classless Inter-Domain Routing block to the Node upon registration, if the user relies on CIDR assignment. The controller also maintains a list of internal Nodes in tandem with the available machines; when a Node is unhealthy, the controller checks the availability of the Node's underlying resources, and deletes it if they are unavailable. Finally, the controller monitors Node health and removes Pods from unreachable Nodes.
Kubernetes is a maturing technology. Updates to the platform have improved the controller's ability to manage networking issues in large numbers of Nodes, by evaluating an entire cluster before committing a Pod eviction.
kubectl is a command line interface that enables the user to run a command against the Kubernetes cluster. For example, the administrator can run a command against a Node to make it un-schedulable for Pods.
Kubelet is the agent that runs on each Node to handle the Pods.
Self-registering Nodes report capacity in terms of CPU and memory volume upon creation of the Node object. Alternatively, administrators set the capacity demands upon Node creation in a manual setup. The Kubernetes scheduler assigns sufficient resources to all Pods on a Node and ensures that requests do not outstrip Node capacity. Kubernetes operates on the assumption that a dedicated subnet is available to each Node server.
Node status includes a variety of information about Pod condition, capacity, information and addresses on the resources compiled into a Node.
Addresses vary based on cloud environments and bare metal configurations. The first of three is HostName, as reported by the Node's kernel; the HostName default can be replaced by using the kubelets parameter --hostname-override. ExternalIP, the second address, corresponds to the Node outside the cluster. The final address is the InternalIP, which relates to the Node only routable within the cluster.
Conditions refers to the status of all running Nodes, report in either True or False. Node conditions include, for example, OutOfDisk for available disk space, Ready to denote Node health and NetworkUnavailable for configuration information, among many other conditions.
Capacity describes available Node resources: CPU, memory and the maximum number of Pods the Node can handle.
Information offers general stats such as versions and names: kernel, kubelet and kube-proxy versions, OS name and, if Docker containers are in use, Docker version.