Pass Kubernetes Administrator CKA exam [Mar 01, 2022] Updated 63 Questions
Linux Foundation CKA Actual Questions and 100% Cover Real Exam Questions
Levels of Certification
The CNCF Certified Kubernetes Administrator exam conducts 4 levels of certification covering different areas of Cloud Native Computing. Charges vary by level with the highest level of certification being the only one that is required in order to obtain the CNCF Certified Kubernetes Administrator certification. Subjects to be tested for each level are listed below. Future changes to the certification levels and pricing are possible.
NEW QUESTION 27
A Kubernetes worker node, named .Investigate why this is the case,
andperform any appropriate steps tobring the node to a state,ensuring that any changes are madepermanent.
You cansshto the failednode using:
[student@node-1] $ | sshWk8s-node-0
You can assume elevatedprivileges on the node with thefollowing command:
[student@w8ks-node-0] $ |sudo -i
Answer:
Explanation:
See the solution below.
Explanation
solution


NEW QUESTION 28
Get list of all the nodes with labels
Answer:
Explanation:
kubectl get nodes --show-labels
NEW QUESTION 29
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 30
Create a persistent volume with name app-data, of capacity 2Gi and access mode ReadWriteMany. The type of volume is hostPath and its location is /srv/app-data.
Answer:
Explanation:
See the solution below.
Explanation
solution
Persistent Volume
A persistent volume is a piece of storage in a Kubernetes 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 know the 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 Persistent Volume
kind: PersistentVolumeapiVersion: v1metadata: name:app-dataspec: capacity: # defines the capacity of PV we are creating storage: 2Gi #the amount of storage we are tying to claim accessModes: # defines the rights of the volume we are creating - ReadWriteMany hostPath: path: "/srv/app-data" # path to which we are creating the volume Challenge
* Create a Persistent Volume named ReadWriteMany, storage classname
shared, 2Gi of 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 will change 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. Ensure that the Persistent Volume Claim has the same storageClassName as the persistentVolume you had previously created.
kind: PersistentVolumeapiVersion: v1metadata: name:
spec:
accessModes: - ReadWriteMany
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 from available to bound.
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: null name: app-dataspec: volumes: - name:congigpvc persistenVolumeClaim: claimName: app-data containers: - image: nginx name: app volumeMounts: - mountPath: "/srv/app-data " name: configpvc
NEW QUESTION 31
Scale the deployment webserver to
Answer:
Explanation:
See the solution below.
Explanation
solution
NEW QUESTION 32
Updates to dynamic user group membership are automatic therefore using dynamic user groups instead of static group objects allows you to:
- A. respond to changes in user behavior or potential threats using manual policy changes
- B. respond to changes in user behavior or potential threats without manual policy changes
- C. respond to changes in user behavior or potential threats without automatic policy changes
- D. respond to changes in user behavior and confirmed threats with manual policy changes
Answer: B
NEW QUESTION 33
Label a node as app=test and verify
Answer:
Explanation:
kubectl label node node-name app=test // Verify kubectl get no -show-labels kubectl get no -l app=test
NEW QUESTION 34
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 35
Create a pod that echo "hello world" and then exists. Have the pod deleted automatically when it's completed
Answer:
Explanation:
See the solution below.
Explanation
kubectl run busybox --image=busybox -it --rm --restart=Never --
/bin/sh -c 'echo hello world'
kubectl get po # You shouldn't see pod with the name "busybox"
NEW QUESTION 36
List all service account and create a service account called "admin"
- A. kubectl get sa
kubectl get sa --all-namespaces
//Verify
kubectl get sa admin -o yaml - B. kubectl get sa
kubectl get sa --all-namespaces
kubectl create sa admin
//Verify
kubectl get sa admin -o yaml
Answer: B
NEW QUESTION 37
Create and configure the servicefront-end-serviceso it's accessiblethroughNodePortand routes to theexisting pod namedfront-end.
Answer:
Explanation:
See the solution below.
Explanation
solution
NEW QUESTION 38
Check the history of deployment
Answer:
Explanation:
kubectl rollout history deployment webapp
NEW QUESTION 39
Create a busybox pod and add "sleep 3600" command
Answer:
Explanation:
See the solution below.
Explanation
kubectl run busybox --image=busybox --restart=Never -- /bin/sh -c
"sleep 3600"
NEW QUESTION 40
Get list of persistent volumes and persistent volume claim in the cluster
Answer:
Explanation:
kubectl get pv kubectl get pvc
NEW QUESTION 41
Create a hostPath PersistentVolume named task-pv-volume with storage 10Gi, access modes ReadWriteOnce, storageClassName manual, and volume at /mnt/data and verify
- A. vim task-pv-volume.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: task-pv-volume
labels:
type: local
spec:
storageClassName: ""
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
kubectl apply -f task-pv-volume.yaml
//Verify
kubectl get pv
NAME CAPACITY ACCESS
MODES RECLAIM POLICY STATUS CLAIM
STORAGECLASS REASON AGE
task-pv-volume 5Gi RWO
Retain Available
3s - B. vim task-pv-volume.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: task-pv-volume
labels:
type: local
spec:
storageClassName: ""
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
kubectl apply -f task-pv-volume.yaml
//Verify
kubectl get pv
NAME CAPACITY ACCESS
MODES RECLAIM POLICY STATUS CLAIM
STORAGECLASS REASON AGE
task-pv-volume 4Gi RWO
Retain Available
8s
Answer: A
NEW QUESTION 42
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 43
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
NEW QUESTION 44
Create a deployment spec file that will:
* Launch 7 replicas of the nginx Image with the labelapp_runtime_stage=dev
* deployment name: kual00201
Save a copy of this spec file to /opt/KUAL00201/spec_deployment.yaml
(or /opt/KUAL00201/spec_deployment.json).
When you are done, clean up (delete) any new Kubernetes API object that you produced during this task.
Answer:
Explanation:
See the solution below.
Explanation
solution

NEW QUESTION 45
Set the node namedek8s-node-1asunavailable and reschedule all thepods running on it.
Answer:
Explanation:
See the solution below.
Explanation
solution
NEW QUESTION 46
......
Linux Foundation CKA Real 2022 Braindumps Mock Exam Dumps: https://actualtests.vceprep.com/CKA-latest-vce-prep.html