kubelet(8)
kubelet is the primary agent that runs on each Kubernetes node to manage pods and ensure containers are running in desired state.
Synopsis
kubelet [OPTIONS]Description
kubelet is a daemon that runs on every node in a Kubernetes cluster. It communicates with the API server to receive pod specifications and ensures that the containers described in those pods are running and healthy. kubelet performs health checks, manages container lifecycle, and reports node status back to the control plane.
kubelet typically runs as a systemd service and reads configuration from files, command-line flags, or a kubeconfig file. It manages the container runtime (usually Docker or containerd) and handles pod networking, storage mounting, and resource management.
Common options
| Flag | What it does |
|---|---|
--kubeconfig=<path> | Path to a kubeconfig file with authorization and master location information |
--node-name=<string> | Name of the node, defaults to the node's hostname if not provided |
--pod-manifest-path=<path> | Path to directory with pod manifest files to load; kubelet watches this directory for changes |
--cluster-dns=<ip> | IP address of the cluster DNS service for pod DNS resolution |
--register-node=<bool> | Register the node with the API server (default: true) |
--max-pods=<int> | Maximum number of pods that can run on this node (default: 110) |
--container-runtime=<string> | Container runtime to use: docker, containerd, or cri-o (default: docker) |
--cgroup-driver=<string> | Driver for managing cgroups: cgroupfs or systemd (default: cgroupfs) |
--v=<int> | Log verbosity level; higher numbers produce more verbose logs |
--healthz-port=<int> | Port for the healthz server (default: 10248) |
--read-only-port=<int> | Port for read-only API serving (default: 10255, set to 0 to disable) |
Examples
Start kubelet with a specific kubeconfig and register as 'worker-1'
kubelet --kubeconfig=/etc/kubernetes/kubelet.conf --node-name=worker-1Start kubelet with static pod manifests and configure cluster DNS
kubelet --pod-manifest-path=/etc/kubernetes/manifests --cluster-dns=10.96.0.10Start the kubelet service (typical production deployment)
systemctl start kubeletStart kubelet with containerd runtime and systemd cgroup driver
kubelet --container-runtime=containerd --cgroup-driver=systemdFollow kubelet logs in real-time from systemd journal
journalctl -u kubelet -fCheck kubelet health endpoint
curl http://localhost:10248/healthz