0

CKA 2

1 / 10

Question

Perform the following tasks:

  • Create a Kubernetes secret named super-secret with the key password and value bob.

  • Create a pod named pod-secrets-via-file using the redis image, which mounts the secret at /secrets.

  • Create a second pod named pod-secrets-via-env using the redis image, which exposes the secret via an environment variable named CONFIDENTIAL.

Which configuration correctly implements the required setup?

2 / 10

Question

Perform the following tasks:

  • Add an init container to the pod named hungry-bear, defined in the spec file at /opt/KUCC00108/pod-spec-KUCC00108.yaml

  • The init container should create an empty file at /workdir/calm.txt

  • If /workdir/calm.txt is not present, the pod should exit

  • Once updated, create the pod using this spec file

Which of the following correctly modifies the YAML to meet all requirements?

3 / 10

Question

You are required to schedule a Pod with the following characteristics:

  • Pod Name: kucc1

  • Number of App Containers: 2

  • Container Name/Image pairs:

    • nginx (image: nginx)

    • consul (image: consul)

Which of the following configurations will correctly create this pod?

4 / 10

Question

You are given access to a broken single-node Kubernetes cluster on host Cka000059, which was migrated from another machine.

  • The original cluster used an external etcd server.

  • After the migration, some cluster components are broken.

  • Your task is to identify the misconfiguration and fix all broken components so the cluster can run successfully again.

What is the correct sequence of actions to fix the issue?

5 / 10

Question

Configure the kubelet systemd-managed service on the node labeled with name=wk8s-node-1 so that it automatically launches a pod containing:

  • A single container

  • Image: httpd

  • Container name: webtool

🔧 Place the required pod spec file in the following directory: /etc/kubernetes/manifests

💡 You can SSH and elevate privileges using:
– ssh wk8s-node-1
– sudo -i

6 / 10

Question

You are required to list all pods, sorted by their creation timestamp (from oldest to newest).
Which of the following commands achieves this correctly?

7 / 10

Question

Create a PersistentVolume with the following specifications:

  • Name: app-data

  • Capacity: 1Gi

  • Access Mode: ReadOnlyMany

  • Type: hostPath

  • Path: /srv/app-data

Which of the following YAML definitions is correct?

8 / 10

Question

List all pods across all namespaces, showing only the pod name and namespace, using a JSONPath expression.

9 / 10

Check how many worker nodes are in the Ready state, excluding nodes tainted with NoSchedule, and write the count to the file: /opt/KUCC00104/kucc00104.txt

10 / 10

Create a deployment with the following specifications:

  • Name: nginx-app

  • Image: nginx:1.11.10-alpine

  • Replicas: 3

Then:

  1. Perform a rolling update to version 1.11.13-alpine.

  2. Rollback the deployment to version 1.11.10-alpine.

Which of the following command sets will correctly complete this task?

Your score is

0%