Interview Prep/Docker/Multi-stage builds, cache, tags and registries

Your pull from a private registry works locally but fails on the Kubernetes node with containerd.

IntermediateScenarioMulti-stage builds, cache, tags and registries
Answer

Situation read → Docker credentials in ~/.docker/config.json are not used by containerd or kubelet.

What I'd do → Create an imagePullSecret (kubectl create secret docker-registry regcred ...) and reference it in the Pod or ServiceAccount, or configure kubelet image credential providers (ECR, GCR, ACR). Check with crictl pull on the node.

Why → Each runtime has its own auth path.

Interview tip → Cloud credential providers avoid long-lived static passwords.

All Docker questions Roadmap: Docker & containers

More on Multi-stage builds, cache, tags and registries