concept Node in category kubernetes

appears as: Node, The Node, Node
Core Kubernetes MEAP V02

This is an excerpt from Manning's book Core Kubernetes MEAP V02.

The Node is the base unit of compute in a Kubernetes cluster. A Node usually consists of the following components:

The following diagram displays what components form a Node.

Figure 1.3. A Node
Node

Every server in a Kubernetes cluster has a kubelet binary running on the Node, and typically another application called kube-proxy. The kubelet binary is in charge of containers and the Pod lifecycle: start, stop, restart, delete, etc. It also handles various Node level operations. Some installers run kubelet as a container, and some do not.

# Get the manifest for the project
curl -LO https://raw.githubusercontent.com/lionkube/core-kubernetes/master/code/chapter-09/pod-with-resources.yml

# Create a single web server Pod
# Note that we’ve added `resources` field to the pod declaration
# This allows us to set limits for memory and cpu usage of the Pod
kubectl apply -f pod-with-resources.yml

# Wait a few seconds for the Pod to finish starting up

# Here we’re going to fetch the pod and container ID from Kubernetes before moving on
# We’ll use these when we start looking at cgroup information in the Node

# This retrieves the ID of the pod in Kubernetes
# Store this value to a local variable pod_id using: export pod_id=...
kubectl get pods httpd-with-resources -o=jsonpath='{.metadata.uid}'

# This retrieves the ID of the container being run in the Pod
# Strip off the leading containerd:// and store the value to a local variable container_id using: export container_id=...
kubectl get pods httpd-with-resources -o=jsonpath='{.status.containerStatuses[0].containerID}'

# Make sure to leave this shell open for the next steps in the lab!
# We need the values stored in those variables and don’t want to lose them
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest