Question 21
You are developing a container image for a .NET Core application tnat requires a specific version of tne .NET Core SDK to be installed. How would you ensure that the correct SDK version is available within your Docker image during the build process?
Question 22
You are running a web application within a Kubernetes cluster. The application consists of two pods, each with a resource request of 1CPU core and I GiB of memory. However, you've noticed that the application experiences performance issues during peak traffic hours. To mitigate these issues, you decide to implement resource quotas tor the namespace where the application runs. You want to ensure that the application pods receive adequate resources while preventing other applications from consuming excessive resources. Design and implement a resource quota for the namespace that sets limits for CPU and memory resources.
Question 23
Refer to Exhibit.

Given a container that writes a log file in format A and a container that converts log files from format A to format B, create a deployment that runs both containers such that the log files from the first container are converted by the second container, emitting logs in format B.
Task:
* Create a deployment named deployment-xyz in the default namespace, that:
* Includes a primary
lfccncf/busybox:1 container, named logger-dev
* includes a sidecar Ifccncf/fluentd:v0.12 container, named adapter-zen
* Mounts a shared volume /tmp/log on both containers, which does not persist when the pod is deleted
* Instructs the logger-dev
container to run the command

which should output logs to /tmp/log/input.log in plain text format, with example values:

* The adapter-zen sidecar container should read /tmp/log/input.log and output the data to /tmp/log/output.* in Fluentd JSON format. Note that no knowledge of Fluentd is required to complete this task: all you will need to achieve this is to create the ConfigMap from the spec file provided at /opt/KDMC00102/fluentd-configma p.yaml , and mount that ConfigMap to /fluentd/etc in the adapter-zen sidecar container

Given a container that writes a log file in format A and a container that converts log files from format A to format B, create a deployment that runs both containers such that the log files from the first container are converted by the second container, emitting logs in format B.
Task:
* Create a deployment named deployment-xyz in the default namespace, that:
* Includes a primary
lfccncf/busybox:1 container, named logger-dev
* includes a sidecar Ifccncf/fluentd:v0.12 container, named adapter-zen
* Mounts a shared volume /tmp/log on both containers, which does not persist when the pod is deleted
* Instructs the logger-dev
container to run the command

which should output logs to /tmp/log/input.log in plain text format, with example values:

* The adapter-zen sidecar container should read /tmp/log/input.log and output the data to /tmp/log/output.* in Fluentd JSON format. Note that no knowledge of Fluentd is required to complete this task: all you will need to achieve this is to create the ConfigMap from the spec file provided at /opt/KDMC00102/fluentd-configma p.yaml , and mount that ConfigMap to /fluentd/etc in the adapter-zen sidecar container
Question 24
You need to schedule a job to run every day at 10:00 AM to clean up old container images in your Kubernetes cluster These images are tagged with "app=my-app" and have been created in the last 7 days. How would you implement this using a CronJob?
Question 25
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?










