Question 51

You have a Deployment named 'bookstore-deployment which deploys a Bookstore application, utilizing a PostgreSQL database. The deployment has 3 replicas. The database server is managed externally. The application is built With a feature to dynamically resize its replica count based on the load- You need to implement a strategy to automatically adjust the replica count to between 2 and 5, based on the CPU utilization of the pods. This should happen without manual intervention.

Question 52

You have a Kubernetes cluster running a critical application. To enhance security, you need to implement a NetworkPolicy that restricts ingress traffic to your application pods only from specific allowed IP addresses and ports. Furthermore, you want to allow egress traffic to all external services.

Question 53

You have a Kubernetes cluster with a namespace called 'dev' and a deployment named 'app-deployment' in that namespace. You need to create a new Role that allows users in the 'developers' group to only scale the Sapp-deployment' deployment. They should not be able to access any other resources in the 'dev' namespace. Implement the RBAC configuration for this scenario.

Question 54

You are running a Deployment for a database service with 3 replicas. You want to ensure that only one pod is updated at a time, but you need to guarantee that the database service remains available throughout tne update process. How would you configure the Deployment to achieve this?

Question 55

You have a Kustomization file that defines a Deployment with two replicas. You want to configure the deployment to use a different image tag based on the environment it is deployed to- For example, in the 'dev' environment, the image tag should be 'example/nginx:dev' , while in the 'prod' environment, it should be 'example:nginx:prod'. Describe how to achieve this using Kustomize.