Question 1

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 2

    Exhibit:

    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 3

    Exhibit:

    Task
    A deployment is falling on the cluster due to an incorrect image being specified. Locate the deployment, and fix the problem.
  • Question 4

    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 5

    Exhibit:

    Context
    A pod is running on the cluster but it is not responding.
    Task
    The desired behavior is to have Kubemetes restart the pod when an endpoint returns an HTTP 500 on the /healthz endpoint. The service, probe-pod, should never send traffic to the pod while it is failing. Please complete the following:
    * The application has an endpoint, /started, that will indicate if it can accept traffic by returning an HTTP 200. If the endpoint returns an HTTP 500, the application has not yet finished initialization.
    * The application has another endpoint /healthz that will indicate if the application is still working as expected by returning an HTTP 200. If the endpoint returns an HTTP 500 the application is no longer responsive.
    * Configure the probe-pod pod provided to use these endpoints
    * The probes should use port 8080