[Q22-Q41] 100% Passing Guarantee - Brilliant CKA Exam Questions PDF [Jan-2024] | TestBraindump

[Q22-Q41] 100% Passing Guarantee - Brilliant CKA Exam Questions PDF [Jan-2024]

Share

100% Passing Guarantee - Brilliant CKA Exam Questions PDF [Jan-2024]

CKA Dumps 2024 - NewLinux Foundation CKA Exam Questions


The CKA certification exam is designed to test the knowledge and skills of candidates in various aspects of Kubernetes administration, such as cluster installation and configuration, application deployment and management, networking, security, and troubleshooting. CKA exam is conducted online and consists of a set of performance-based tasks that require candidates to demonstrate their ability to perform various Kubernetes administration tasks in a time-bound manner.


Linux Foundation Certified Kubernetes Administrator (CKA) program is designed to help IT professionals demonstrate their expertise in Kubernetes administration. Kubernetes is an open-source container orchestration system that automates the deployment, scaling, and management of containerized applications. With the increasing popularity of Kubernetes, the demand for certified Kubernetes administrators has also risen. The CKA certification exam validates the skills and knowledge required for the efficient administration of Kubernetes clusters.

 

NEW QUESTION # 22
Score: 13%

Task
A Kubernetes worker node, named wk8s-node-0 is in state NotReady. Investigate why this is the case, and perform any appropriate steps to bring the node to a Ready state, ensuring that any changes are made permanent.

Answer:

Explanation:
See the solution below.
Explanation
Solution:
sudo -i
systemctl status kubelet
systemctl start kubelet
systemctl enable kubelet


NEW QUESTION # 23
Get all the pods with label "env"

Answer:

Explanation:
kubectl get pods -L env


NEW QUESTION # 24
Print all pod name and all image name and write it to a file
name "/opt/pod-details.txt"

Answer:

Explanation:
kubectl get pods -o=custom-columns='Pod Name:metadata.name','Image:spec.containers[*].image' > /opt/pod-details.txt


NEW QUESTION # 25
Create a deployment as follows:
Name: nginx-app
Using container nginx with version 1.11.10-alpine
The deployment should contain
Next, deploy the application with new version , by performing a rolling update.
Finally, rollback that update to the previous version

Answer:

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

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

F:\Work\Data Entry Work\Data Entry\20200827\CKA\7 D.JPG


NEW QUESTION # 26
Score: 7%

Task
Reconfigure the existing deployment front-end and add a port specification named http exposing port 80/tcp of the existing container nginx.
Create a new service named front-end-svc exposing the container port http.
Configure the new service to also expose the individual Pods via a NodePort on the nodes on which they are scheduled.

Answer:

Explanation:
Solution:
kubectl get deploy front-end
kubectl edit deploy front-end -o yaml
#port specification named http
#service.yaml
apiVersion: v1
kind: Service
metadata:
name: front-end-svc
labels:
app: nginx
spec:
ports:
- port: 80
protocol: tcp
name: http
selector:
app: nginx
type: NodePort
# kubectl create -f service.yaml
# kubectl get svc
# port specification named http
kubectl expose deployment front-end --name=front-end-svc --port=80 --tarport=80 --type=NodePort


NEW QUESTION # 27
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
F:\Work\Data Entry Work\Data Entry\20200827\CKA\5 B.JPG

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

F:\Work\Data Entry Work\Data Entry\20200827\CKA\5 D.JPG


NEW QUESTION # 28
Create a persistent volume with nameapp-data, of capacity2Giandaccess modeReadWriteMany. Thetype of volume ishostPathand itslocation is/srv/app-data.

Answer:

Explanation:
See the solution below.
Explanation
solution
Persistent Volume
A persistent volume is a piece of storage in aKubernetes cluster. PersistentVolumes are a cluster-level resource like nodes, which don't belong to any namespace. It is provisioned by the administrator and has a particular file size. This way, a developer deploying their app on Kubernetes need not knowthe underlying infrastructure.
When the developer needs a certain amount of persistent storage for their application, the system administrator configures the cluster so that they consume the PersistentVolume provisioned in an easy way.
Creating PersistentVolume
kind: PersistentVolumeapiVersion: v1metadata:name:app-dataspec:capacity: # defines the capacity of PV we are creatingstorage:2Gi#the amount of storage we are tying to claimaccessModes: # defines the rights of the volumewe are creating-ReadWriteManyhostPath:path: "/srv/app-data" # path to which we are creating the volume Challenge
* Create a Persistent Volume named ReadWriteMany, storage classname
shared,2Giof storage capacity and the host path

2. Save the file and create the persistent volume.
Image for post

3. View the persistent volume.

* Our persistent volume status is available meaning it is available and it has not been mounted yet. This status willchange when we mount the persistentVolume to a persistentVolumeClaim.
PersistentVolumeClaim
In a real ecosystem, a system admin will create the PersistentVolume then a developer will create a PersistentVolumeClaim which will be referenced in a pod. A PersistentVolumeClaim is created by specifying the minimum size and the access mode they require from the persistentVolume.
Challenge
* Create a Persistent Volume Claim that requests the Persistent Volume we had created above. The claim should request 2Gi. Ensurethat the Persistent Volume Claim has the same storageClassName as the persistentVolume you had previously created.
kind: PersistentVolumeapiVersion: v1metadata:name:
spec:
accessModes:-ReadWriteManyresources:
requests:storage:2Gi
storageClassName:shared
2. Save and create the pvc
njerry191@cloudshell:~(extreme-clone-2654111)$ kubect1 create -f app-data.yaml persistentvolumeclaim/app-data created
3. View the pvc
Image for post

4. Let's see what has changed in the pv we had initially created.
Image for post

Our status has now changed fromavailabletobound.
5. Create a new pod named myapp with image nginx that will be used to Mount the Persistent Volume Claim with the path /var/app/config.
Mounting a Claim
apiVersion: v1kind: Podmetadata:creationTimestamp: nullname: app-dataspec:volumes:- name:congigpvcpersistenVolumeClaim:claimName: app-datacontainers:- image: nginxname:
appvolumeMounts:- mountPath: "


NEW QUESTION # 29
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 # 30
Given a partially-functioningKubernetes cluster, identifysymptoms of failure on the cluster.
Determine the node, the failingservice, and take actions to bring upthe failed service and restore thehealth of the cluster. Ensure that anychanges are made permanently.
You cansshto the relevant Inodes (bk8s-master-0orbk8s-node-0) using:
[student@node-1] $ ssh<nodename>
You can assume elevatedprivileges on any node in thecluster with the followingcommand:
[student@nodename] $ | sudo -i

Answer:

Explanation:
See the solution below.
Explanation
solution



NEW QUESTION # 31
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 be persistent.

Answer:

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

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

F:\Work\Data Entry Work\Data Entry\20200827\CKA\13 D.JPG


NEW QUESTION # 32
Score: 4%

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

Answer:

Explanation:
SOLUTION:
[student@node-1] > ssh ek8s
kubectl cordon ek8s-node-1
kubectl drain ek8s-node-1 --delete-local-data --ignore-daemonsets --force


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

Answer:

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 # 34
Create a pod with image nginx called nginx and allow traffic on port 80

Answer:

Explanation:
See the solution below.
Explanation
kubectlrun nginx --image=nginx --restart=Never --port=80


NEW QUESTION # 35
List pod logs named "frontend" and search for the pattern "started" and write it to a file "/opt/error-logs"

Answer:

Explanation:
See the solution below.
Explanation
Kubectl logs frontend | grep -i "started" > /opt/error-logs


NEW QUESTION # 36
A Kubernetes worker node, named wk8s-node-0 is in state NotReady. Investigate why this is the case, and perform any appropriate steps to bring the node to a Ready state, ensuring that any changes are made permanent.
You can ssh to the failed node using:
[student@node-1] $ | ssh Wk8s-node-0
You can assume elevated privileges on the node with the following command:
[student@w8ks-node-0] $ | sudo -i

Answer:

Explanation:
See the solution below.
Explanation
solution



NEW QUESTION # 37
Schedule a pod as follows:
* Name: nginx-kusc00101
* Image: nginx
* Node selector: disk=ssd

Answer:

Explanation:
See the solution below.
Explanation
solution



NEW QUESTION # 38
// Create a configmap
kubectl create configmap redis-config --from-file=/opt/redisconfig
// Verify
kubectl get configmap redis-config -o yaml
// first run this command to save the pod yml
kubectl run redis-pod --image=redis --restart=Always --dry-run
-o yaml > redis-pod.yml
// edit the yml to below file and create
apiVersion: v1
kind: Pod
metadata:
name: redis
spec:
containers:
- name: redis
image: redis
env:
- name: MASTER
value: "true"
ports:
- containerPort: 6379
volumeMounts:
- mountPath: /redis-master-data
name: data
- mountPath: /redis-master
name: config
volumes:
- name: data
emptyDir: {}
- name: config
configMap:
name: example-redis-config

  • A. items:
    - key: redis-config
    path: redis.conf
    cf
    kk kubectl apply -f redis-pod.yml
    // // Verify
    K kubectl exec -it redis - cat /redis-master-data/redis.conf
  • B. items:
    - key: redis-config
    path: redis.conf
    cf
    // // Verify
    K kubectl exec -it redis - cat /redis-master-data/redis.conf

Answer: A


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

Answer:

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


NEW QUESTION # 40
Scale down the deployment to 1 replica

Answer:

Explanation:
kubectl scale deployment webapp -replicas=1 //Verify kubectl get deploy kubectl get po,rs


NEW QUESTION # 41
......

Free CKA braindumps download: https://quiztorrent.testbraindump.com/CKA-exam-prep.html