Question 31
You are running a web application with multiple services exposed via Kubernetes Ingress. The application has two distinct environments: 'staging' and 'production' , each with its own set of services and domain names. You need to configure Ingress rules to route traffic to the appropriate services based on the requested hostname and environment. For example, requests to 'staging.example.com' should be directed to the staging environment, while requests to 'example.com' should go to the production environment. Implement this configuration using Ingress rules.
Question 32
You have a Deployment running with a specific image tag, and you want to roll out a new version with a different image tag- However, you want to ensure that the update process is gradual, and only one pod is updated at a time. Additional'" you need to monitor the performance metrics of the application during the update, and if the performance degrades significantly, you need to rollback to the previous version How would you implement this using Kustomize and other Kubernetes features?
Question 33
Refer to Exhibit.

Set Configuration Context:
[student@node-1] $ | kubectl
Config use-context k8s
Context
A web application requires a specific version of redis to be used as a cache.
Task
Create a pod with the following characteristics, and leave it running when complete:
* The pod must run in the web namespace.
The namespace has already been created
* The name of the pod should be cache
* Use the Ifccncf/redis image with the 3.2 tag
* Expose port 6379

Set Configuration Context:
[student@node-1] $ | kubectl
Config use-context k8s
Context
A web application requires a specific version of redis to be used as a cache.
Task
Create a pod with the following characteristics, and leave it running when complete:
* The pod must run in the web namespace.
The namespace has already been created
* The name of the pod should be cache
* Use the Ifccncf/redis image with the 3.2 tag
* Expose port 6379
Question 34
You are building a web application that requires environment-specific configurations, such as database connection details and API keys. You want to use ConfigMaps to manage these configurations in a secure and efficient way You have the following environment variables defined in your deployment YAML:

Create a ConfigMap named 'my-app-config' containing the following data: - 'database host: 'db.example.com' - 'api_key':

Create a ConfigMap named 'my-app-config' containing the following data: - 'database host: 'db.example.com' - 'api_key':
Question 35
You are developing a Kubernetes application that requires dynamic configuration updates. You decide to utilize ConfigMaps to manage these configurations. You have a ConfigMap named 'app-config' containing the following configuration:

Your application retrieves these configuration values from the 'app-config' ConfigMap. You need to update the 'database_password' value without restarting the application pods. How can you achieve this?

Your application retrieves these configuration values from the 'app-config' ConfigMap. You need to update the 'database_password' value without restarting the application pods. How can you achieve this?







