Skip to main content

Static Pods

Static pods are run directly by the kubelet bypassing the Kubernetes API server checks and validations. Most of the time DaemonSet is a better alternative to static pods, but some workloads need to run before the Kubernetes API server is available or might need to bypass security restrictions imposed by the API server. See Kubernetes documentation for more information on static pods.

Configuration

Static pod definitions are specified in the Talos machine configuration:
Talos renders static pod definitions to the kubelet using a local HTTP server, kubelet picks up the definition and launches the pod. Talos accepts changes to the static pod configuration without a reboot. To see a full list of static pods, use talosctl get staticpods, and to see the status of the static pods (as reported by the kubelet), use talosctl get staticpodstatus.

Usage

Kubelet mirrors pod definition to the API server state, so static pods can be inspected with kubectl get pods, logs can be retrieved with kubectl logs, etc.
If the API server is not available, status of the static pod can also be inspected with talosctl containers --kubernetes:
Logs of static pods can be retrieved with talosctl logs --kubernetes:

Troubleshooting

Talos doesn’t perform any validation on the static pod definitions. If the pod isn’t running, use kubelet logs (talosctl logs kubelet) to find the problem:

Resource definitions

Static pod definitions are available as StaticPod resources combined with Talos-generated control plane static pods:
Talos assigns ID <namespace>-<name> to the static pods specified in the machine configuration. On control plane nodes status of the running static pods is available in the StaticPodStatus resource: