An image pull error occurs when Kubernetes cannot download the container image required by a Pod. The usual causes are a misspelled image name, a missing repository image, or missing registry credentials. section 3.2.3
Check these causes first:
- Verify the image name and tag in the Deployment configuration. section 3.2.3
- Confirm that the image exists in the container repository. section 3.2.3
- Check that the cluster has credentials for a private repository. section 3.2.3
- Apply configuration corrections with kubectl apply -f deploy.yaml. section 3.2.3
Listing 3.1 Chapter03/3.2_DeployingToKubernetes/deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: timeserver
spec:
replicas: 3 #1
selector:
matchLabels:
pod: timeserver-pod
template:
metadata:
labels:
pod: timeserver-pod
spec:
containers:
- name: timeserver-container
image: docker.io/wdenniss/timeserver:1 #2
Use the Deployment manifest to inspect the image name and tag Kubernetes will pull. section 3.2.3
