exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 2 question 4 discussion

Actual exam question from Microsoft's AZ-400
Question #: 4
Topic #: 2
[All AZ-400 Questions]

HOTSPOT -
You have an Azure Kubernetes Service (AKS) pod.
You need to configure a probe to perform the following actions:
✑ Confirm that the pod is responding to service requests.
✑ Check the status of the pod four times a minute.
✑ Initiate a shutdown if the pod is unresponsive.
How should you complete the YAML configuration file? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: readinessProbe:
For containerized applications that serve traffic, you might want to verify that your container is ready to handle incoming requests. Azure Container Instances supports readiness probes to include configurations so that your container can't be accessed under certain conditions.
Incorrect Answers:
livenessProbe: Containerized applications may run for extended periods of time, resulting in broken states that may need to be repaired by restarting the container. Azure Container Instances supports liveness probes so that you can configure your containers within your container group to restart if critical functionality is not working.

Box 2: periodSeconds: 15 -
The periodSeconds property designates the readiness command should execute every 15 seconds.
Reference:
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-readiness-probe

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
k8smaster
Highly Voted 3 years, 9 months ago
The readinessProbe is wrong. It clearly says "Initiate a shutdown if the pod is unresponsive." How can you iniate a shutdown (restart) with readinessProbe. It must have been livelinessProbe.
upvoted 92 times
Tranquillo1811
2 years, 6 months ago
The real question is, what "Shutdown" actually means: a) restart the container b) remove the pod from the SLB
upvoted 1 times
...
rdemontis
3 years ago
Agree with you. Here the question asks to initiate a shutdown if the pod is unresponsive. Shutdown means that the process will be killed and then restarted. It's different from a simple restart. "If the process in your container is able to crash on its own whenever it encounters an issue or becomes unhealthy, you do not necessarily need a liveness probe; the kubelet will automatically perform the correct action in accordance with the Pod's restartPolicy. If you'd like your container to be killed and restarted if a probe fails, then specify a liveness probe, and specify a restartPolicy of Always or OnFailure" https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
upvoted 4 times
...
...
jperona
Highly Voted 3 years, 9 months ago
The correct answer is liveness because you want that your POD restart in case of failure. Readiness remove the POD from Load Balancer, but doesn't restart it. The kubelet uses liveness probes to know when to restart a container. For example, liveness probes could catch a deadlock, where an application is running, but unable to make progress. Restarting a container in such a state can help to make the application more available despite bugs. The kubelet uses readiness probes to know when a container is ready to start accepting traffic. A Pod is considered ready when all of its containers are ready. One use of this signal is to control which Pods are used as backends for Services. When a Pod is not ready, it is removed from Service load balancers.
upvoted 66 times
d0bermannn
3 years, 7 months ago
best comment here
upvoted 7 times
...
...
Zeus666
Most Recent 3 months, 2 weeks ago
The readiness probe ensures that the container is ready to handle incoming requests, and the periodSeconds property indicates the frequency of the readiness check.
upvoted 1 times
...
sondrex
10 months ago
1. livenessProbe: Ensures the container is running. If the liveness probe fails, Kubernetes will kill the container and restart it 2. initialDelaySeconds: 15
upvoted 5 times
...
4bd3116
1 year ago
The correct answer is livenessProbe, and periodSeconds: 15 : apiVersion: v1 kind: Pod metadata: name: my-aks-pod spec: containers: - name: my-app-container image: my-app-image ports: - containerPort: 80 livenessProbe: httpGet: path: /healthz port: 80 initialDelaySeconds: 15 periodSeconds: 15 failureThreshold: 3
upvoted 2 times
...
FeriAZ
1 year, 1 month ago
Liveness Probes Period Seconds: 15
upvoted 2 times
...
vsvaid
1 year, 3 months ago
Liveness Probes Period Seconds; 15 Liveness Probes are used to check if the pod is responding or not. If not reboot. Readiness probe is used to check if the pod is ready to accept request.
upvoted 2 times
...
sint822
1 year, 5 months ago
livelinessProbe is correct. readinessProbe is for checking container dependencies and seeing if services are ready for serve request.
upvoted 1 times
...
yana_b
1 year, 8 months ago
Readiness probe & period seconds:15
upvoted 4 times
...
omerco61
1 year, 10 months ago
I quote in microsoft official site; Readines Probes; For containerized applications that serve traffic, you might want to verify that your container is ready to handle incoming requests. liveness probes; Azure Container Instances supports liveness probes so that you can configure your containers within your container group to restart if critical functionality is not working. Answers; Liveness Probes Period Seconds; 15
upvoted 2 times
...
Fal991l
2 years, 1 month ago
yaml code (GPT): livenessProbe: httpGet: path: /Server port: <port number> initialDelaySeconds: 15 periodSeconds: 15 timeoutSeconds: 15 failureThreshold: 4
upvoted 1 times
...
Vmwarevirtual
2 years, 1 month ago
The provided answers are correct - check the definition regarding containers probe types - https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
upvoted 3 times
...
syu31svc
2 years, 8 months ago
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-readiness-probe https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/ "readinessProbe Indicates whether the container is ready to respond to requests" "Confirm that the pod is responding to service requests" (From question) I would agree with the given answer
upvoted 3 times
syu31svc
2 years, 7 months ago
Sorry disregard my earlier answer Is liveness as per what the rest have mentioned
upvoted 2 times
...
...
Govcomm
2 years, 9 months ago
liveness to reboot when the system is unresponsive. Readness is when the system ready to accepts the requests.
upvoted 2 times
...
Eltooth
2 years, 11 months ago
Liveness Period seconds 15
upvoted 5 times
...
ben_t
2 years, 11 months ago
I agree with liveness probe, it is described here https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-setting-up-health-checks-with-readiness-and-liveness-probes But it is Microsoft tests and all will be possible. One can observe metadata where you can find the name of pod =) It is related to readyness.
upvoted 1 times
...
UnknowMan
2 years, 11 months ago
liveness is most appropriate (Kill the process)
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago