BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Cloud Developer Exam - Topic 15 Question 126 Discussion

Posted by Dean on Aug 17, 2026 at 09:19 AM

You need to configure a Deployment on Google Kubernetes Engine (GKE). You want to include a check that verifies that the containers can connect to the database. If the Pod is failing to connect, you want a script on the container to run to complete a graceful shutdown. How should you configure the Deployment?

Suggested Answer: B

https://cloud.google.com/architecture/best-practices-for-running-cost-effective-kubernetes-applications-on-gke#make_sure_your_applications_are_shutting_down_in_accordance_with_kubernetes_expectations


Get Premium Professional Cloud Developer Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
21 comments · newest first
ME
Melodie 2 days ago
I think option B is the best. Liveness probes are crucial for health checks.
BI
Billye 7 days ago
B covers Jannetterything needed for a graceful shutdown.
JA
Jannette 12 days ago
D is interesting, but initContainers can be tricky.
GE
Gearldine 17 days ago
I like C, but PreStop is better in B.
PR
Precious 22 days ago
Option A seems too complicated. Two jobs? No thanks.
LA
Lacey 28 days ago
I agree, B makes sense. It handles failures well.
FR
Frankie 1 month ago
I think option B is the best. Liveness probe is crucial.
DA
Daryl 1 month ago
D seems interesting, but initContainers might complicate things too much.
CH
Chantell 1 month ago
Wait, can a livenessProbe really handle database connections? Seems risky.
BE
Bernadine 2 months ago
Totally agree with B, it's the most efficient way to handle this!
LI
Lillian 2 months ago
I think A is better, jobs are more reliable for checks.
BR
Brandon 2 months ago
Option B sounds right, livenessProbe is key here.
TA
Tammara 2 months ago
I agree with B, it’s the most efficient way to handle this!
LA
Lawana 2 months ago
C seems a bit off. PostStart checks after the container starts, not before.
CH
Cherry 2 months ago
Wait, can a Prestop really run if the Pod is already failing?
TW
Twana 3 months ago
I think A is better. Jobs are more reliable for checks.
GE
Gertude 3 months ago
Option B sounds right with the livenessProbe and Prestop handler.
QU
Quentin 3 months ago
I recall that PreStop handlers are important for graceful shutdowns, so option B could be the most effective approach here.
SO
Sommer 3 months ago
I think we practiced something similar where we used lifecycle hooks. Option C seems plausible, but I’m not confident about the PostStart handler.
CO
Corrinne 3 months ago
I'm not entirely sure, but I feel like using an initContainer in option D might not be the best choice since it runs before the main container starts.
AN
Annmarie 4 months ago
I remember we discussed livenessProbes in class, and I think option B sounds right since it directly checks the container's health.
0/2000 characters

Save Cancel