Welcome to the Linux Foundation Forum!

Having problems with livenessProbe- image

    terminationMessagePolicy: File
  - name: goproxy
    image: k8s.gcr.io/goproxy:0.1
    ports:
    - containerPort: 8080
    readinessProbe:
      tcpSocket:
        port: 8080
      initialDelaySeconds: 5
      periodSeconds: 10
    livenessProbe:
      tcpSocket:
        port: 8080
      initialDelaySeconds: 15
      periodSeconds: 20
  dnsPolicy: ClusterFirst

ubuntu@ip-172-31-2-212:~/app1$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-688c5c8689-c886f 1/1 Running 1 7h56m
registry-7f9b448c88-j5mkg 1/1 Running 1 7h56m
try1-854bb566bd-77lzm 0/2 ImagePullBackOff 0 10s
try1-854bb566bd-7htvq 0/2 ImagePullBackOff 0 10s
try1-854bb566bd-gtwn4 0/2 ImagePullBackOff 0 10s
try1-854bb566bd-hwfq4 0/2 ImagePullBackOff 0 10s
try1-854bb566bd-lrj2j 0/2 ImagePullBackOff 0 10s
try1-854bb566bd-p9p6g 0/2 ImagePullBackOff 0 10s

Answers

  • paulo.peres
    paulo.peres Posts: 5
    edited June 2022

    when I did the readinessProbe only three pods came up, still I was able to get the point and get inside the pods and create the /tmp/healthy file.
    with livenessProbe all the pods got an error with imagePullBackOff.

  • I was able to fix it, but I had to scale my deployment down to 3 replicas, somehow when I use 6 replicas 3 of them give me an imagePullBackoff error.

Categories

Upcoming Training