0
0
Microservicessystem_design~10 mins

Liveness and readiness probes in Microservices - 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 path in a Kubernetes pod spec.

Microservices
livenessProbe:
  httpGet:
    path: [1]
    port: 8080
Drag options to blanks, or click blank then click option'
A/healthz
B/ready
C/metrics
D/status
Attempts:
3 left
💡 Hint
Common Mistakes
Using readiness probe path for liveness probe
Using metrics endpoint for liveness
2fill in blank
medium

Complete the code to define a readiness probe path in a Kubernetes pod spec.

Microservices
readinessProbe:
  httpGet:
    path: [1]
    port: 8080
Drag options to blanks, or click blank then click option'
A/healthz
B/status
C/ready
D/metrics
Attempts:
3 left
💡 Hint
Common Mistakes
Using liveness probe path for readiness probe
Using metrics endpoint for readiness
3fill in blank
hard

Fix the error in the probe configuration to correctly specify the initial delay seconds.

Microservices
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: [1]
Drag options to blanks, or click blank then click option'
A0
B-5
C"five"
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string instead of a number
Using negative or zero values
4fill in blank
hard

Fill both blanks to configure a readiness probe with a TCP socket check and a timeout.

Microservices
readinessProbe:
  tcpSocket:
    port: [1]
  timeoutSeconds: [2]
Drag options to blanks, or click blank then click option'
A8080
B5
C10
D80
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect port numbers
Setting timeout too high or zero
5fill in blank
hard

Fill all three blanks to configure a liveness probe with an exec command, initial delay, and period seconds.

Microservices
livenessProbe:
  exec:
    command:
      - [1]
      - [2]
  initialDelaySeconds: [3]
Drag options to blanks, or click blank then click option'
Acat
B/tmp/healthy
C10
Dls
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong command or file path
Setting initial delay too low