2024 Correct and Up-to-date Linux Foundation CKA BrainDumps [Q25-Q45]

Share

2024 Correct and Up-to-date Linux Foundation CKA BrainDumps

Current CKA dumps Preparation through Our Practice Test


The CKA certification is valid for three years, and candidates can renew their certification by retaking the exam or by earning a higher-level certification. Certified Kubernetes Administrator (CKA) Program Exam certification is recognized by industry leaders, including AWS, Google Cloud, and Red Hat. Certified Kubernetes Administrator (CKA) Program Exam certification also provides access to a network of certified professionals and resources, including training, events, and community support. Overall, the CKA certification is an excellent way to demonstrate your expertise in Kubernetes and advance your career in the cloud-native ecosystem.

 

NEW QUESTION # 25
Set the node namedek8s-node-1asunavailable and reschedule all thepods running on it.

Answer:

Explanation:
See the solution below.
Explanation
solution


NEW QUESTION # 26
Score: 5%

Task
From the pod label name=cpu-utilizer, find pods running high CPU workloads and write the name of the pod consuming most CPU to the file /opt/KUTR00401/KUTR00401.txt (which already exists).

Answer:

Explanation:
Solution:
kubectl top -l name=cpu-user -A
echo 'pod name' >> /opt/KUT00401/KUT00401.txt


NEW QUESTION # 27
Configure the kubelet systemd- managed service, on the node labelled with name=wk8s-node-1, to launch a pod containing a single container of Image httpd named webtool automatically. Any spec files required should be placed in the /etc/kubernetes/manifests directory on the node.
You can ssh to the appropriate node using:
[student@node-1] $ ssh wk8s-node-1
You can assume elevated privileges on the node with the following command:
[student@wk8s-node-1] $ | sudo -i

Answer:

Explanation:
solution





NEW QUESTION # 28
Create a pod that having 3 containers in it? (Multi-Container)

Answer:

Explanation:
See the solution below.
Explanation
image=nginx, image=redis, image=consul
Name nginx container as "nginx-container"
Name redis container as "redis-container"
Name consul container as "consul-container"
Create a pod manifest file for a container and append container
section for rest of the images
kubectl run multi-container --generator=run-pod/v1 --image=nginx --
dry-run -o yaml > multi-container.yaml
# then
vim multi-container.yaml
apiVersion: v1
kind: Pod
metadata:
labels:
run: multi-container
name: multi-container
spec:
containers:
- image: nginx
name: nginx-container
- image: redis
name: redis-container
- image: consul
name: consul-container
restartPolicy: Always


NEW QUESTION # 29
Create a NetworkPolicy which denies all ingress traffic

  • A. apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
    name: default-deny
    spec:
    podSelector: {}
    policyTypes:
    - Ingress
  • B. apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
    name: default-deny
    spec:
    podSelector: ()
    policyTypes:
    - Ingress

Answer: A


NEW QUESTION # 30
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.

Answer:

Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\2 C.JPG


NEW QUESTION # 31
Check the Image version of nginx-dev pod using jsonpath

Answer:

Explanation:
kubect1 get po nginx-dev -o jsonpath='{.spec.containers[].image}{"\n"}'


NEW QUESTION # 32
Score: 4%

Task
Create a pod named kucc8 with a single app container for each of the following images running inside (there may be between 1 and 4 images specified): nginx + redis + memcached .

Answer:

Explanation:
See the solution below.
Explanation
Solution:
kubectl run kucc8 --image=nginx --dry-run -o yaml > kucc8.yaml
# vi kucc8.yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
name: kucc8
spec:
containers:
- image: nginx
name: nginx
- image: redis
name: redis
- image: memcached
name: memcached
- image: consul
name: consul
#
kubectl create -f kucc8.yaml
#12.07


NEW QUESTION # 33
Configure the kubelet systemd-managed service, on the nodelabelled withname=wk8s-node-1, tolaunch a pod containing a singlecontainer of Image automatically. Any spec filesrequired should be placed in the/etc/kubernetes/manifests You canssh to theappropriate node using:
[student@node-1] $ sshwk8s-node-1
You can assume elevatedprivileges on the node with thefollowing command:
[student@wk8s-node-1] $ |sudo -i

Answer:

Explanation:
See the solution below.
Explanation
solution





NEW QUESTION # 34
Undo the deployment to the previous version 1.17.1 and verify Image has the previous version

Answer:

Explanation:
kubectl rollout undo deploy webapp kubectl describe deploy webapp | grep Image


NEW QUESTION # 35
Task Weight: 4%

Task
Scale the deployment webserver to 3 pods.

Answer:

Explanation:
Solution:


NEW QUESTION # 36
Check the Image version of nginx-dev pod using jsonpath

Answer:

Explanation:
See the solution below.
Explanation
kubect1 get po nginx-dev -o
jsonpath='{.spec.containers[].image}{"\n"}'


NEW QUESTION # 37
List all the pods sorted by name

Answer:

Explanation:
See the solution below.
Explanation
kubect1 get pods --sort-by=.metadata.name


NEW QUESTION # 38
Create a pod named kucc8 with a single app container for each of the following images running inside (there may be between 1 and 4 images specified):
nginx + redis + memcached.

Answer:

Explanation:
solution



NEW QUESTION # 39
Deployment
a. Create a deployment of webapp with image nginx:1.17.1 with
container port 80 and verify the image version

  • A. // Create initial YAML file with -dry-run option
    kubectl create deploy webapp --image=nginx:1.17.1 --dryrun=client -o yaml > webapp.yaml vim webapp.yaml apiVersion: apps/v1 kind: Deployment metadata:
    labels:
    app: webapp
    name: webapp
    spec: replicas: 1 selector: matchLabels: app: webapp template: metadata: labels: app: webapp spec: containers: - image: nginx:1.17.1 name: nginx kubectl create -f webapp.yaml -record=true //Verify Image Version kubectl describe deploy webapp | grep -i "Image" Using JsonPath kubectl get deploy -o=jsonpath='{range.items [*]}{.[*]} {.metadata.name}{"\t"}{.spec.template.spec.containers[*].i mage}{"\n"}'
  • B. // Create initial YAML file with -dry-run option
    kubectl create deploy webapp --image=nginx:1.17.1 --dryrun=client -o yaml > webapp.yaml vim webapp.yaml apiVersion: apps/v1 kind: Deployment metadata:
    labels:
    app: webapp
    name: webapp
    spec: replicas: 1 containers: - image: nginx:1.17.1 name: nginx kubectl create -f webapp.yaml -record=true //Verify Image Version kubectl describe deploy webapp | grep -i "Image" Using JsonPath kubectl get deploy -o=jsonpath='{range.items [*]}{.[*]} {.metadata.name}{"\t"}{.spec.template.spec.containers[*].i mage}{"\n"}'

Answer: A


NEW QUESTION # 40
Check to see how many worker nodes are ready (not including nodes tainted NoSchedule) and write the number to /opt/KUCC00104/kucc00104.txt.

Answer:

Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\15 B.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\15 C.JPG


NEW QUESTION # 41
Create a deployment called webapp with image nginx having 5 replicas in it, put the file in /tmp directory with named webapp.yaml

  • A. //Create a file using dry run command
    kubectl create deploy --image=nginx --dry-run -o yaml >
    /tmp/webapp.yaml
    // Now, edit file webapp.yaml and update replicas=5
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
    app: webapp
    name: webapp
    spec:
    replicas: 5
    selector:
    matchLabels:
    app: webapp
    template:
    metadata:
    labels:
    Note: Search "deployment" in kubernetes.io site , you will get
    the page
    https://kubernetes.io/docs/concepts/workloads/controllers/deplo
    yment/
    // Verify the Deployment
    kubectl get deploy webapp --show-labels
    // Output the YAML file of the deployment webapp
    kubectl get deploy webapp -o yaml
  • B. //Create a file using dry run command
    kubectl create deploy --image=nginx --dry-run -o yaml >
    /tmp/webapp.yaml
    // Now, edit file webapp.yaml and update replicas=5
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
    app: webapp
    name: webapp
    spec:
    replicas: 5
    selector:
    matchLabels:
    app: webapp
    template:
    metadata:
    labels:
    app: webapp
    spec:
    containers:
    - image: nginx
    name: nginx
    Note: Search "deployment" in kubernetes.io site , you will get
    the page
    https://kubernetes.io/docs/concepts/workloads/controllers/deplo
    yment/
    // Verify the Deployment
    kubectl get deploy webapp --show-labels
    // Output the YAML file of the deployment webapp
    kubectl get deploy webapp -o yaml

Answer: B


NEW QUESTION # 42
Score: 4%

Context
You have been asked to create a new ClusterRole for a deployment pipeline and bind it to a specific ServiceAccount scoped to a specific namespace.
Task
Create a new ClusterRole named deployment-clusterrole, which only allows to create the following resource types:
* Deployment
* StatefulSet
* DaemonSet
Create a new ServiceAccount named cicd-token in the existing namespace app-team1.
Bind the new ClusterRole deployment-clusterrole lo the new ServiceAccount cicd-token , limited to the namespace app-team1.

Answer:

Explanation:
See the solution below.
Explanation
Solution:
Task should be complete on node -1 master, 2 worker for this connect use command
[student@node-1] > ssh k8s
kubectl create clusterrole deployment-clusterrole --verb=create
--resource=deployments,statefulsets,daemonsets
kubectl create serviceaccount cicd-token --namespace=app-team1
kubectl create rolebinding deployment-clusterrole --clusterrole=deployment-clusterrole
--serviceaccount=default:cicd-token --namespace=app-team1


NEW QUESTION # 43
Create an nginx pod which loads the secret as environment variables

  • A. // create a yml file
    kubectl run nginx --image=nginx --restart=Never --dry-run -o
    yaml > nginx.yml
    // add env section below and create
    vim nginx.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    envFrom:
    - secretRef:
    name: my-secret
    restartPolicy: Never
    kubectl apply -f nginx.yaml
    //verify
    kubectl exec -it nginx - env
  • B. // create a yml file
    kubectl run nginx --image=nginx --restart=Never --dry-run -o
    yaml > nginx.yml
    // add env section below and create
    vim nginx.yaml
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    envFrom:
    - secretRef:
    name: my-secret
    restartPolicy: Never
    kubectl apply -f nginx.yaml
    //verify
    kubectl exec -it nginx - env

Answer: A


NEW QUESTION # 44
Print pod name and start time to "/opt/pod-status" file

Answer:

Explanation:
kubect1 get pods -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'


NEW QUESTION # 45
......


The Certified Kubernetes Administrator (CKA) Program Certification Exam is an industry-recognized certification that validates an individual's expertise in deploying, managing, and troubleshooting Kubernetes clusters. CKA exam is designed to test the candidate's practical skills and knowledge in various aspects of Kubernetes administration, such as pod scheduling, network configuration, storage management, and security. Certified Kubernetes Administrator (CKA) Program Exam certification is offered by the Linux Foundation, a non-profit organization that promotes the adoption of open-source software and technologies.


The CKA exam is designed to evaluate the candidate's ability to perform tasks related to Kubernetes administration. It is a performance-based exam that requires the candidate to complete tasks using Kubernetes command-line tools. CKA exam consists of 24 tasks that are divided into eight categories, including Application Lifecycle Management, Cluster Maintenance, Installation and Configuration, Networking, Storage, Security, Scheduling, and Logging and Monitoring.

 

100% Reliable Microsoft CKA Exam Dumps Test Pdf Exam Material: https://pass4sure.examcost.com/CKA-practice-exam.html