Recall & Review
beginner
What is an exec probe in Kubernetes?
An exec probe runs a command inside a container to check if the container is healthy. If the command succeeds, the container is considered healthy.
Click to reveal answer
beginner
Which Kubernetes probe type uses a command to check container health?
The exec probe type uses a command executed inside the container to check its health.
Click to reveal answer
intermediate
How do you define an exec probe in a Pod YAML file?
You define an exec probe under the livenessProbe or readinessProbe section with a command list under exec, like: <br>
livenessProbe:
exec:
command: ["/bin/check.sh"]
initialDelaySeconds: 5
periodSeconds: 10Click to reveal answer
beginner
What happens if the exec probe command fails?
If the exec probe command returns a non-zero exit code, Kubernetes considers the container unhealthy and may restart it depending on the probe type.
Click to reveal answer
intermediate
Why use exec probes instead of HTTP or TCP probes?
Exec probes allow custom health checks by running any command inside the container, useful when HTTP or TCP checks are not applicable.
Click to reveal answer
What does an exec probe do in Kubernetes?
✗ Incorrect
Exec probes run a command inside the container to determine health.
Where do you specify the exec command in a Kubernetes probe?
✗ Incorrect
The exec command is specified under exec: command: in the probe section.
What exit code from an exec probe command means the container is healthy?
✗ Incorrect
Exit code 0 means success and healthy container.
If an exec probe fails repeatedly, what does Kubernetes do?
✗ Incorrect
Kubernetes restarts the container if the liveness exec probe fails repeatedly.
Which probe type is best when you need to run a custom script inside the container?
✗ Incorrect
Exec probes allow running custom scripts or commands inside the container.
Explain how to configure an exec probe in a Kubernetes Pod YAML file.
Think about where the exec command goes and timing settings.
You got /3 concepts.
Describe what happens when an exec probe command fails in Kubernetes.
Focus on exit codes and Kubernetes reaction.
You got /3 concepts.