Question 12 of 84 from exam PCD: Professional Cloud Developer

Question 12 of 84 from exam PCD: Professional Cloud Developer

Question

You are planning to deploy your application in a Google Kubernetes Engine (GKE) cluster.

The application exposes an HTTP-based health check at /healthz.

You want to use this health check endpoint to determine whether traffic should be routed to the pod by the load balancer.

Which code snippet should you include in your Pod configuration? A.

livenessProbe:
httpGet:
path: /healthz
port: 80

B.

readinessProbe:
httpGet:
path: /healthz
port: 80

C.

loadbalancerHealthCheck:
httpGet:
path: /healthz
port: 80

D.

healthCheck:
httpGet:
path: /healthz
port: 80

Explanations

B.

For the GKE ingress controller to use your readinessProbes as health checks, the Pods for an Ingress must exist at the time of Ingress creation.

If your replicas are scaled to 0, the default health check will apply.