0
0
Kubernetesdevops~10 mins

Exec probe configuration 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 an exec liveness probe command in a Kubernetes pod spec.

Kubernetes
livenessProbe:
  exec:
    command:
      - [1]
Drag options to blanks, or click blank then click option'
Acat
Bcurl
Cls
Decho
Attempts:
3 left
💡 Hint
Common Mistakes
Using commands that require network like curl in exec probe without network setup.
2fill in blank
medium

Complete the code to set the exec probe to check the file '/tmp/healthy'.

Kubernetes
livenessProbe:
  exec:
    command:
      - cat
      - [1]
Drag options to blanks, or click blank then click option'
A/etc/healthy
B/home/healthy
C/tmp/healthy
D/var/log/healthy
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing wrong file paths that do not exist in the container.
3fill in blank
hard

Fix the error in the exec probe command to correctly check the file '/healthz'.

Kubernetes
livenessProbe:
  exec:
    command:
      - [1]
      - [2]
Drag options to blanks, or click blank then click option'
Acat /healthz
Bcat
Cls /healthz
D/healthz
Attempts:
3 left
💡 Hint
Common Mistakes
Putting command and argument together as one string causing syntax error.
4fill in blank
hard

Fill both blanks to define an exec readiness probe that runs 'cat /ready'.

Kubernetes
readinessProbe:
  exec:
    command:
      - [1]
      - [2]
Drag options to blanks, or click blank then click option'
Acat
B/ready
C/healthz
Dls
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping command and argument positions.
5fill in blank
hard

Fill all three blanks to define an exec startup probe that runs 'test -f /startup'.

Kubernetes
startupProbe:
  exec:
    command:
      - [1]
      - [2]
      - [3]
Drag options to blanks, or click blank then click option'
Atest
B-f
C/startup
D-e
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong file check option like '-e' instead of '-f'.