Question 16

Exhibit:

Context
Developers occasionally need to submit pods that run periodically.
Task
Follow the steps below to create a pod that will start at a predetermined time and]which runs to completion only once each time it is started:
* Create a YAML formatted Kubernetes manifest /opt/KDPD00301/periodic.yaml that runs the following shell command: date in a single busybox container. The command should run every minute and must complete within 22 seconds or be terminated oy Kubernetes. The Cronjob namp and container name should both be hello
* Create the resource in the above manifest and verify that the job executes successfully at least once
  • Question 17

    Refer to Exhibit.

    Task:
    Update the Deployment app-1 in the frontend namespace to use the existing ServiceAccount app.

    Question 18


    Context
    A user has reported an aopticauon is unteachable due to a failing livenessProbe .
    Task
    Perform the following tasks:
    * Find the broken pod and store its name and namespace to /opt/KDOB00401/broken.txt in the format:

    The output file has already been created
    * Store the associated error events to a file /opt/KDOB00401/error.txt, The output file has already been created. You will need to use the -o wide output specifier with your command
    * Fix the issue.

    Question 19

    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

    Question 20


    Context
    Developers occasionally need to submit pods that run periodically.
    Task
    Follow the steps below to create a pod that will start at a predetermined time and]which runs to completion only once each time it is started:
    * Create a YAML formatted Kubernetes manifest /opt/KDPD00301/periodic.yaml that runs the following shell command: date in a single busybox container. The command should run every minute and must complete within 22 seconds or be terminated oy Kubernetes. The Cronjob namp and container name should both be hello
    * Create the resource in the above manifest and verify that the job executes successfully at least once See the solution below.