0
0
Kubernetesdevops~10 mins

Why probes keep applications healthy in Kubernetes - Test Your Understanding

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 that checks the application health on port 8080.

Kubernetes
livenessProbe:
  httpGet:
    path: /healthz
    port: [1]
Drag options to blanks, or click blank then click option'
A8080
B80
C443
D3000
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong port number causes the probe to fail.
2fill in blank
medium

Complete the code to set a readiness probe that checks the path '/ready' on port 9090.

Kubernetes
readinessProbe:
  httpGet:
    path: [1]
    port: 9090
Drag options to blanks, or click blank then click option'
A/healthz
B/status
C/ready
D/live
Attempts:
3 left
💡 Hint
Common Mistakes
Using the liveness path instead of readiness path.
3fill in blank
hard

Fix the error in the probe configuration by choosing the correct probe type.

Kubernetes
[1]:
  exec:
    command:
    - cat
    - /tmp/healthy
Drag options to blanks, or click blank then click option'
AreadinessProbe
BlivenessProbe
ChttpGet
DtcpSocket
Attempts:
3 left
💡 Hint
Common Mistakes
Using httpGet or tcpSocket keys incorrectly.
4fill in blank
hard

Fill both blanks to create a readiness probe with a TCP socket check on port 3306.

Kubernetes
readinessProbe:
  [1]:
    port: [2]
Drag options to blanks, or click blank then click option'
AtcpSocket
BhttpGet
C3306
D8080
Attempts:
3 left
💡 Hint
Common Mistakes
Using HTTP probe type with a port number for TCP check.
5fill in blank
hard

Fill all three blanks to define a liveness probe that runs a command, with initial delay and timeout seconds.

Kubernetes
livenessProbe:
  exec:
    command:
    - [1]
    - [2]
  initialDelaySeconds: [3]
Drag options to blanks, or click blank then click option'
Acat
B/tmp/healthy
C5
Dcurl
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong command or missing initial delay.