Question 26

You have a ConfigMap named 'my-app-config' that stores environment variables for your application. You want to dynamically update tne values in the ConfigMap without restarting the pods. How would you achieve this using a Kubernetes Patch?

Question 27

You have a Kubernetes cluster with a Deployment named 'wordpress-deployment running 3 replicas of a WordPress container. You want to expose this deployment as a service and ensure that the service only forwards traffic to the pods With the label 'version: v?. You need to create a service with the following requirements:
- The service name should be swordpress-service'
- The service should be of type 'Load8alancer' for external access.
- The service should only target pods with the label 'version: v?
- The service should expose port 80 on tne service, wmch maps to port 8080 in the WordPress container.

Question 28

You are tasked with deploying an application with a deployment named 'web-app' that requires a specific SecurityContext to run. The application should be able to access a specific hostPath volume mounted at '/data' and should be able to run as a non-root user with a specific UID. You need to define the Securitycontext in your Deployment configuration to ensure the application runs with the required privileges and access.

Question 29

You have a Node.js application that runs in a Kubernetes cluster. The application requires access to a MySQL database hosted externally on a different server. Due to security concerns, you cannot directly expose the database to the application pod. Describe how you can implement a network policy to enable secure communication between the application pod and the MySQL database.

Question 30

You are managing a Kubernetes cluster running a highly-available application that uses a custom resource called 'Orders. The 'orders resource is created and managed by a custom controller that ensures the order processing workflow runs flawlessly. However, the 'order' resource's validation rules have changed, requiring a new schema to be applied. How can you ensure that the existing 'Order' resources conform to the new schema without disrupting the application's functionality?