ImagePullBackOff error on 1 out of 2 replica pods

Viewed 267

I created a deployment using yaml file with 2 replicas. Out of 2 replicas, 1 is running and other in ImagePullBackOff error state. I've nginx latest image on my local cluster downloaded also. Below is the error on describing pod

Warning  Failed     9m27s (x4 over 11m)  kubelet, kube      Error: ErrImagePull
Normal   Pulling    9m27s (x4 over 11m)  kubelet, kube      Pulling image "nginx"
Warning  Failed     9m27s                kubelet, kube      Failed to pull image "nginx": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:44322->[::1]:53: read: connection refused
Warning  Failed     60s (x43 over 11m)   kubelet, kube      Error: ImagePullBackOff

Deployment file.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
spec:
  selector:
    matchLabels:
      run: my-nginx
  replicas: 2
  template:
    metadata:
      labels:
        run: my-nginx
    spec:
      containers:
      - name: my-nginx
        #imagePullPolicy: Never
        image: nginx
        ports:
        - containerPort: 80
0 Answers
Related