Complete the code to specify the liveness probe command in a Kubernetes pod spec.
livenessProbe:
exec:
command:
- [1]The liveness probe uses curl to check if the container is alive by making an HTTP request.
Complete the code to set the initial delay before the liveness probe starts.
livenessProbe:
initialDelaySeconds: [1]The initialDelaySeconds is set to 10 seconds to give the container time to start before probing.
Fix the error in the restart policy to ensure the container restarts on failure.
restartPolicy: [1]The OnFailure restart policy restarts the container only if it fails, which is typical for probe failure handling.
Fill both blanks to configure readiness and liveness probes with HTTP GET method.
readinessProbe:
httpGet:
path: [1]
port: [2]
livenessProbe:
httpGet:
path: /healthz
port: 8080The readiness probe checks /ready on port 8080, matching the liveness probe port.
Fill all three blanks to create a liveness probe with exec command, initial delay, and failure threshold.
livenessProbe:
exec:
command:
- [1]
initialDelaySeconds: [2]
failureThreshold: [3]The probe uses pgrep to check a process, waits 15 seconds before starting, and allows 3 failures before restart.