/kubernetes-platform-skills:container-runtime-docker-containerdfrom kubernetes-platform-skills
Guides choosing and configuring container runtimes (Docker Engine, containerd, CRI-O) for Kubernetes nodes, including rootless mode, runtime class setup (runc/crun/gVisor/Kata), and dockershim migration.
Ships in kubernetes-platform-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The container runtime is the layer that actually creates namespaces, cgroups, and processes for a container — it sits below the image build process entirely and below Kubernetes's own scheduling logic. Since Kubernetes 1.24 removed dockershim, every node runs a CRI-compliant runtime directly (containerd or CRI-O), and Docker Engine itself is no longer a supported node runtime for new clusters, though it remains extremely relevant as a local development and image-build tool. Getting runtime configuration wrong — rootful-by-default containers, a misconfigured cgroup driver mismatching kubelet's, no sandboxing for untrusted workloads — produces either broken node bootstrap or a real container-escape risk. This skill covers the runtime engine layer; building and tagging images is a separate concern (see container-build-and-release).
config.toml) — registry mirrors, cgroup
driver, pull-through cache, private registry auth.runc.OCI runtime create failed,
cgroup driver mismatch, missing seccomp profile).crictl (the CRI-level equivalent of docker/nerdctl CLI) for
debugging directly against whatever CRI runtime is in use, configured
via /etc/crictl.yaml pointing at the correct runtime socket./etc/containerd/config.toml, /etc/crio/crio.conf.d/) and restart
the runtime service — this is a node-level, not workload-level,
change and typically requires a node drain/cordon for a live cluster.cgroupDriver (systemd is the
current recommended default) matches the runtime's own cgroup driver
setting exactly — a mismatch is one of the most common node
bootstrap failures.docker build), not as the Kubernetes
node runtime — see
container-build-and-release
for that usage.Choose containerd vs. CRI-O deliberately:
nerdctl for a Docker-CLI-like local experience), and is
the default on most managed Kubernetes node images (EKS, GKE, AKS
all ship containerd-based nodes).Confirm and align the cgroup driver before/during node bootstrap — this is the single most common "node won't join" failure:
# /etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
# kubelet config must match
cgroupDriver: systemd
Configure a registry mirror/pull-through cache to reduce external registry dependency and rate-limit exposure:
# /etc/containerd/config.toml
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["https://mirror.internal.example.com", "https://registry-1.docker.io"]
sudo systemctl restart containerd
Configure private registry authentication without embedding credentials in the config file directly where avoidable — use a credential helper or a separately-permissioned config path:
[plugins."io.containerd.grpc.v1.cri".registry.configs."registry.internal.example.com".auth]
auth = "${REGISTRY_AUTH_BASE64}"
Prefer Kubernetes-native imagePullSecrets at the workload level for
per-namespace registry credentials over node-wide containerd auth
config wherever the credential scope should be workload-specific
rather than node-wide.
Debug directly at the CRI level when a pod fails to start but
kubectl describe pod doesn't give enough detail:
sudo crictl ps -a
sudo crictl logs <container-id>
sudo crictl inspect <container-id>
This bypasses kubelet's abstraction and shows exactly what the runtime attempted and why it failed (missing image, OCI spec error, seccomp/AppArmor profile rejection).
Run rootless containers where host attack-surface reduction is
the priority (most relevant for standalone Docker/containerd use —
e.g. CI runners — rather than typical Kubernetes node setups, which
usually rely on Pod-level securityContext.runAsNonRoot and user
namespaces instead):
# rootless Docker (dockerd-rootless-setuptool.sh, bundled with Docker ≥ 20.10)
dockerd-rootless-setuptool.sh install
systemctl --user start docker
# rootless containerd + nerdctl
containerd-rootless-setuptool.sh install
nerdctl run --rm alpine echo hello
Kubernetes' own user-namespace support (stable since 1.30 via
hostUsers: false on the PodSpec) provides an analogous benefit at
the pod level without needing a fully rootless node daemon:
spec:
hostUsers: false
Add a sandboxed RuntimeClass for workloads needing stronger
isolation than default runc namespaces (untrusted code execution,
hard multi-tenancy):
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata: { name: gvisor }
handler: runsc
spec:
runtimeClassName: gvisor
This requires the sandboxed runtime (gVisor's runsc, or Kata
Containers) actually installed and registered with containerd/CRI-O
on the node first (containerd's config.toml needs a matching
runtimes.runsc entry) — applying the RuntimeClass alone without
the node-side handler installed leaves pods stuck in
CreateContainerError.
Migrate a cluster off Docker/dockershim, if any node still runs it: since Kubernetes 1.24, dockershim no longer exists in-tree at all, so this is not an optional modernization but a hard requirement for any node still on ≤ 1.23 to upgrade past — drain each node, reprovision with a containerd/CRI-O-based node image (most managed Kubernetes offerings handle this automatically on node group/pool replacement), and rejoin:
kubectl drain <node> --ignore-daemonsets --delete-emptydir-data
# reprovision node with containerd-based image, then:
kubectl uncordon <node>
crictl/nerdctl for node-level runtime debugging instead of
reaching for a Docker Engine install "because it's familiar" — adding
Docker Engine alongside the CRI runtime on a Kubernetes node is
redundant, adds an unused daemon, and does not reflect what actually
runs the pod's containers.runc everywhere.imagePullSecrets/workload-level
securityContext and user namespaces over node-wide rootless-daemon
setups for isolating workload identity/permissions inside a cluster —
node-level rootless mode matters most for standalone Docker/CI-runner
use, not typical multi-tenant Kubernetes nodes.Symptom: A node fails to join the cluster, or kubelet logs show
cgroup-driver related errors, right after provisioning.
Fix: The kubelet's cgroupDriver and the runtime's own cgroup
driver setting (containerd's SystemdCgroup option, CRI-O's
equivalent) disagree — align both to systemd (the current
recommended default across distributions) and restart both services.
Symptom: A pod requesting a sandboxed RuntimeClass (gVisor/Kata)
gets stuck in CreateContainerError with a handler-not-found-style
message.
Fix: The RuntimeClass Kubernetes object was created, but the
corresponding runtime handler was never installed/registered in the
node's containerd config.toml (runtimes.runsc/runtimes.kata).
Both the Kubernetes-level RuntimeClass and the node-level runtime
installation are required; neither alone is sufficient.
Symptom: After a Kubernetes upgrade past 1.23/1.24, a legacy node
image referencing docker:// as the container runtime fails to
bootstrap entirely.
Fix: dockershim was removed in-tree in Kubernetes 1.24 with no
fallback — this is not a configuration bug to patch around. Reprovision
the node with a containerd- or CRI-O-based image before attempting to
join it to a 1.24+ control plane.
Symptom: Private registry pulls fail on some nodes but not others
despite identical Kubernetes-level imagePullSecrets.
Fix: Node-level containerd registry auth config
(/etc/containerd/config.toml or the newer hosts.toml-per-registry
layout) drifted between nodes — confirm the auth config is applied
identically across all nodes via bootstrap automation rather than a
manual per-node edit, since imagePullSecrets and node-level
containerd auth are two separate mechanisms that can each mask or
duplicate the other depending on which the scheduler happens to hit.
Symptom: crictl commands fail with a connection error even
though kubectl shows the node Ready and pods running fine.
Fix: crictl is pointed at the wrong CRI socket
(/etc/crictl.yaml runtime-endpoint) — common after migrating a
node from one runtime to another without updating this config file;
point it explicitly at the active runtime's socket
(unix:///run/containerd/containerd.sock for containerd,
unix:///var/run/crio/crio.sock for CRI-O).
Scenario: Configure a containerd-based node to use systemd
cgroups, mirror Docker Hub through an internal cache, and add a gVisor
RuntimeClass for an untrusted-code-execution workload.
# /etc/containerd/config.toml
version = 2
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
endpoint = ["https://mirror.internal.example.com", "https://registry-1.docker.io"]
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runsc]
runtime_type = "io.containerd.runsc.v1"
sudo systemctl restart containerd
sudo crictl info | grep -A2 cgroupDriver # confirm systemd is active
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata: { name: gvisor }
handler: runsc
---
apiVersion: v1
kind: Pod
metadata: { name: untrusted-job }
spec:
runtimeClassName: gvisor
containers:
- name: sandboxed
image: ghcr.io/example/untrusted-runner:2.1.0
kubectl apply -f gvisor-runtimeclass.yaml -f untrusted-pod.yaml
kubectl get pod untrusted-job
sudo crictl ps -a | grep untrusted-job
sudo crictl inspect <container-id> | grep -i runtimeType
The pod reaches Running, and crictl inspect confirms the container
was actually created under io.containerd.runsc.v1 (gVisor) rather than
the default runc, giving the untrusted workload a syscall-interception
sandbox boundary in addition to standard Kubernetes RBAC/NetworkPolicy
isolation.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
35 skills in this plugin
/cert-manager-tls-automationGuides installing and configuring cert-manager for automated TLS certificate issuance and renewal — Issuers vs. ClusterIssuers, ACME/ Let's Encrypt HTTP-01 and DNS-01 challenges, private-CA issuance, and integration with Ingress-nginx and Istio gateways. Use when a user asks to "automate TLS certificates on Kubernetes," "set up cert-manager with Let's Encrypt," "fix a stuck Certificate that won't become Ready," "use DNS-01 for a wildcard cert," "rotate mTLS certs automatically," or "issue certs from an internal CA."
/cni-networking-calico-flannelGuides choosing and installing a Kubernetes CNI plugin — Calico vs. Flannel — including NetworkPolicy enforcement capability differences, BGP vs. VXLAN/overlay data paths, and IP address management (IPAM) tradeoffs. Use when a user asks to "choose a CNI plugin for Kubernetes," "enable NetworkPolicy enforcement," "set up Calico with BGP peering," "install Flannel," "debug pod-to-pod connectivity across nodes," or "migrate from Flannel to Calico."
/complete-kubernetes-deployment-on-aks-from-scratchSequences a complete, end-to-end AKS deployment from a bare Azure subscription to a production-ready cluster serving a first workload — Azure landing zone prerequisites, AKS cluster and node pool provisioning, Azure CNI (with the Calico/Cilium alternative noted), ingress (Application Gateway Ingress Controller vs. ingress-nginx), cert-manager with Azure DNS, conformance validation, a Helm-deployed workload, and a node/cluster health baseline. This is an integration/orchestration skill that sequences several existing tool-specific skills in the correct order and flags the handoff points between them — it does not restate their internals. Use when a user asks to "deploy a Kubernetes cluster on AKS from scratch," "set up a new AKS environment end to end," "build a production AKS cluster from a fresh Azure subscription," or "give me the full sequence to go from nothing to a working AKS cluster."
/complete-kubernetes-deployment-on-eks-from-scratchSequences a complete, end-to-end EKS deployment from a bare AWS account to a production-ready cluster serving a first workload — landing zone/IAM prerequisites, EKS cluster and node group provisioning, VPC CNI (with the Calico/Cilium alternative noted), ingress (ALB vs. ingress-nginx), cert- manager with Route 53 DNS-01, conformance validation, a Helm-deployed workload, and a node/cluster health baseline. This is an integration/ orchestration skill that sequences several existing tool-specific skills in the correct order and flags the handoff points between them — it does not restate their internals. Use when a user asks to "deploy a Kubernetes cluster on EKS from scratch," "stand up a new EKS environment end to end," "build a production EKS cluster from a fresh AWS account," or "give me the full sequence to go from nothing to a working EKS cluster."
/complete-kubernetes-deployment-on-gke-from-scratchSequences a complete, end-to-end GKE deployment from a bare GCP project to a production-ready cluster serving a first workload — GCP landing zone prerequisites, GKE cluster and node pool provisioning, VPC-native/ Dataplane V2 CNI (with the Calico alternative noted), ingress (GKE Ingress/Gateway API vs. ingress-nginx), cert-manager with Cloud DNS, conformance validation, a Helm-deployed workload, and a node/cluster health baseline. This is an integration/orchestration skill that sequences several existing tool-specific skills in the correct order and flags the handoff points between them — it does not restate their internals. Use when a user asks to "deploy a Kubernetes cluster on GKE from scratch," "set up a new GKE environment end to end," "build a production GKE cluster from a fresh GCP project," or "give me the full sequence to go from nothing to a working GKE cluster."
/complete-kubernetes-deployment-on-oke-oci-from-scratchSequences a complete, end-to-end OKE (Oracle Container Engine for Kubernetes) deployment from a bare OCI tenancy to a production-ready cluster serving a first workload — OCI landing zone prerequisites (Compartments, Dynamic Groups), OKE Enhanced cluster and node pool provisioning, VCN-Native pod networking (with the Calico NetworkPolicy add-on noted), ingress (Native Ingress Controller vs. ingress-nginx), cert-manager with OCI DNS via a community webhook solver, conformance validation, a Helm-deployed workload, and a node/cluster health baseline. This is an integration/orchestration skill sequencing several existing tool-specific skills in the correct order and flagging the handoff points between them — it does not restate their internals. Use when a user asks to "deploy a Kubernetes cluster on OKE from scratch," "set up OKE on OCI end to end," "build a production OKE cluster from a fresh OCI tenancy," or "give me the full sequence to go from nothing to a working OKE cluster."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin kubernetes-platform-skillsOther plugins' skills for the same job