Question 76

You have a Deployment named 'wordpress-deployment' that runs 3 replicas of a Wordpress container. You need to set up resource requests and limits for CPU and memory for each pod. The application requires a minimum of 250m CPU and 512Mi memory, but it should not exceed 500m CPU and IGi memory. Furthermore, implement a resource quota for the swordpress' namespace to ensure that the total CPU requests and limits do not exceed 2 CPIJ and 4Gi memory, respectively.

Question 77

You need to design a mufti-container Pod that includes a main application container and a sidecar container- The sidecar container should periodically check the health of the main application container using a health Check mechanism. If tne main application container iS unhealthy, the sidecar container should take corrective actions like restarting the main container or sending an alert. Explain how you can accomplish this using a sidecar container and health check probes.

Question 78


Context
A pod is running on the cluster but it is not responding.
Task
The desired behavior is to have Kubemetes restart the pod when an endpoint returns an HTTP 500 on the
/healthz endpoint. The service, probe-pod, should never send traffic to the pod while it is failing. Please complete the following:
* The application has an endpoint, /started, that will indicate if it can accept traffic by returning an HTTP 200.
If the endpoint returns an HTTP 500, the application has not yet finished initialization.
* The application has another endpoint /healthz that will indicate if the application is still working as expected by returning an HTTP 200. If the endpoint returns an HTTP 500 the application is no longer responsive.
* Configure the probe-pod pod provided to use these endpoints
* The probes should use port 8080

Question 79

You have a Deployment named 'my-app-deployment' running three replicas of an application container. You need to implement a rolling update strategy were only one pod is updated at a time. Additionally, you need to ensure tnat tne update process is triggered automatically whenever a new image is pushed to your private Docker registry.

Question 80

You are building a microservice application that consists of multiple Pods. Each Pod needs to access a shared database hosted in a separate Pod. How would you create a ConfigMap to store the database connection details and make it available to all Pods in the application?