0
0
Kubernetesdevops~10 mins

Liveness probe concept in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a liveness probe using an HTTP GET request.

Kubernetes
livenessProbe:
  httpGet:
    path: [1]
    port: 8080
Drag options to blanks, or click blank then click option'
A/status
B/live
C/ready
D/healthz
Attempts:
3 left
💡 Hint
Common Mistakes
Using readiness probe paths like /ready instead of liveness probe paths.
Using an incorrect or non-existent path.
2fill in blank
medium

Complete the code to set the initial delay before the liveness probe starts.

Kubernetes
livenessProbe:
  initialDelaySeconds: [1]
Drag options to blanks, or click blank then click option'
A10
B5
C0
D30
Attempts:
3 left
💡 Hint
Common Mistakes
Setting initialDelaySeconds to 0 causing immediate probes.
Setting too long delay causing slow failure detection.
3fill in blank
hard

Fix the error in the liveness probe configuration by completing the missing field.

Kubernetes
livenessProbe:
  tcpSocket:
    port: [1]
Drag options to blanks, or click blank then click option'
A8080
B80
Ctcp
Dhttp
Attempts:
3 left
💡 Hint
Common Mistakes
Using protocol names like 'http' or 'tcp' instead of port numbers.
Using a port number not exposed by the container.
4fill in blank
hard

Fill both blanks to configure a liveness probe with an exec command and failure threshold.

Kubernetes
livenessProbe:
  exec:
    command:
      - [1]
      - [2]
  failureThreshold: 3
Drag options to blanks, or click blank then click option'
Acat
Bls
C/tmp/healthy
D/tmp/notfound
Attempts:
3 left
💡 Hint
Common Mistakes
Using commands that do not check liveness properly.
Using a file path that does not exist.
5fill in blank
hard

Fill all three blanks to create a liveness probe with HTTP GET, timeout, and period seconds.

Kubernetes
livenessProbe:
  httpGet:
    path: [1]
    port: [2]
  timeoutSeconds: [3]
  periodSeconds: 10
Drag options to blanks, or click blank then click option'
A/healthz
B8080
C5
D/status
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect paths or ports.
Setting timeoutSeconds longer than periodSeconds.