Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: mxmas70

Home > Linux Foundation > Kubernetes Administrator > CKA

CKA Certified Kubernetes Administrator (CKA) Program Question and Answers

Question # 4

Task

Create a new HorizontalPodAutoscaler (HPA ) named apache-server in the autoscale

namespace. This HPA must target the existing Deployment called apache-server in the

autoscale namespace.

Set the HPA to aim for 50% CPU usage per Pod . Configure it to have at least 1 Pod and no more than 4 Pods . Also, set the downscale stabilization window to 30 seconds.

Full Access
Question # 5

Create an nginx pod and list the pod with different levels of verbosity

Full Access
Question # 6

List the nginx pod with custom columns POD_NAME and POD_STATUS

Full Access
Question # 7

Get IP address of the pod – “nginx-dev”

Full Access
Question # 8

Scale the deployment webserver to 6 pods.

Full Access
Question # 9

You must connect to the correct host.

Failure to do so may result in a zero score.

[candidate@base] $ ssh Cka000046

Task

First, create a new StorageClass named local-path for an existing provisioner named rancher.io/local-path .

Set the volume binding mode to WaitForFirstConsumer .

Not setting the volume binding mode or setting it to anything other than WaitForFirstConsumer may result in a reduced score.

Next, configure the StorageClass local-path as the default StorageClass .

Full Access
Question # 10

For this item, you will have to ssh to the nodes ik8s-master-0 and ik8s-node-0 and complete all tasks on these nodes. Ensure that you return to the base node (hostname: node-1) when you have completed this item.

Context

As an administrator of a small development team, you have been asked to set up a Kubernetes cluster to test the viability of a new application.

Task

You must use kubeadm to perform this task. Any kubeadm invocations will require the use of the --ignore-preflight-errors=all option.

    Configure the node ik8s-master-O as a master node. .

    Join the node ik8s-node-o to the cluster.

Full Access
Question # 11

Task Weight: 4%

Task

Schedule a Pod as follows:

• Name: kucc1

• App Containers: 2

• Container Name/Images:

o nginx

o consul

Full Access
Question # 12

Score: 7%

Task

Create a new nginx Ingress resource as follows:

• Name: ping

• Namespace: ing-internal

• Exposing service hi on path /hi using service port 5678

Full Access
Question # 13

Create a nginx pod with label env=test in engineering namespace

Full Access
Question # 14

List all the pods showing name and namespace with a json path expression

Full Access
Question # 15

Check the image version in pod without the describe command

Full Access
Question # 16

You must connect to the correct host.

Failure to do so may result in a zero score.

[candidate@base] $ ssh Cka000056

Task

Review and apply the appropriate NetworkPolicy from the provided YAML samples.

Ensure that the chosen NetworkPolicy is not overly permissive, but allows communication between the frontend and backend Deployments, which run in the frontend and backend namespaces respectively.

First, analyze the frontend and backend Deployments to determine the specific requirements for the NetworkPolicy that needs to be applied.

Next, examine the NetworkPolicy YAML samples located in the ~/netpol folder.

Failure to comply may result in a reduced score.

Do not delete or modify the provided samples. Only apply one of them.

Finally, apply the NetworkPolicy that enables communication between the frontend and backend Deployments, without being overly permissive.

Full Access
Question # 17

List all persistent volumes sorted by capacity, saving the full kubectl output to /opt/KUCC00102/volume_list. Use kubectl 's own functionality for sorting the output, and do not manipulate it any further.

Full Access
Question # 18

You must connect to the correct host.

Failure to do so may result in a zero score.

[candidate@base] $ ssh Cka000047

Task

A MariaDB Deployment in the mariadb namespace has been deleted by mistake. Your task is to restore the Deployment ensuring data persistence. Follow these steps:

Create a PersistentVolumeClaim (PVC ) named mariadb in the mariadb namespace with the

following specifications:

Access mode ReadWriteOnce

Storage 250Mi

You must use the existing retained PersistentVolume (PV ).

Failure to do so will result in a reduced score.

There is only one existing PersistentVolume .

Edit the MariaDB Deployment file located at ~/mariadb-deployment.yaml to use PVC you

created in the previous step.

Apply the updated Deployment file to the cluster.

Ensure the MariaDB Deployment is running and stable.

Full Access
Question # 19

Score: 4%

Task

Create a persistent volume with name app-data , of capacity 1Gi and access mode ReadOnlyMany. The type of volume is hostPath and its location is /srv/app-data .

Full Access
Question # 20

Ensure a single instance of pod nginx is running on each node of the Kubernetes cluster where nginx also represents the Image name which has to be used. Do not override any taints currently in place.

Use DaemonSet to complete this task and use ds-kusc00201 as DaemonSet name.

Full Access
Question # 21

List all the pods sorted by name

Full Access
Question # 22

Create a pod as follows:

    Name: non-persistent-redis

    container Image: redis

    Volume with name: cache-control

    Mount path: /data/redis

The pod should launch in the staging namespace and the volume must not be persistent.

Full Access
Question # 23

Create and configure the service front-end-service so it's accessible through NodePort and routes to the existing pod named front-end.

Full Access
Question # 24

Score: 4%

Task

Set the node named ek8s-node-1 as unavailable and reschedule all the pods running on it.

Full Access