Want to know Examcollection CKA Exam practice test features? Want to lear more about Linux-Foundation Certified Kubernetes Administrator (CKA) Program certification experience? Study Realistic Linux-Foundation CKA answers to Rebirth CKA questions at Examcollection. Gat a success with an absolute guarantee to pass Linux-Foundation CKA (Certified Kubernetes Administrator (CKA) Program) test on your first attempt.
Free CKA Demo Online For Linux-Foundation Certifitcation:
NEW QUESTION 1
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 thestagingnamespace and the volumemust notbe persistent.
Answer: A
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 2
Check to see how many worker nodes are ready (not including nodes taintedNoSchedule) and write the number to/opt/KUCC00104/kucc00104.txt.
Answer: A
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 3
Set the node named ek8s-node-1as unavailable and reschedule all the pods running on it.
Answer: A
Explanation:
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\19 B.JPG
NEW QUESTION 4
List all the pods sorted by created timestamp
Answer: A
Explanation:
kubect1 get pods--sort-by=.metadata.creationTimestamp
NEW QUESTION 5
Create a pod namedkucc8with asingle app container for each of the
following images running inside(there may be between 1 and 4images specified): nginx + redis + memcached.
Answer: A
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 6
Create a persistent volume with nameapp-data, of capacity2Giandaccess modeReadWriteMany. Thetype of volume ishostPathand itslocation is/srv/app-data.
Answer: A
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 namedapp-data, with access modeReadWriteMany, storage classname
shared,2Giof storage capacity and the host path/srv/app-data.
* 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:app-data 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: "/srv/app-data"name: configpvc
NEW QUESTION 7
Create 2 nginx image pods in which one of them is labelled with env=prod and another one labelled with
env=dev and verify the same.
Answer: A
Explanation:
kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=prod nginx-prod --dry-run -o yaml > nginx-prodpod.yaml Now, edit nginx-prod-pod.yaml file and remove entries like ??creationTimestamp: null?? ??dnsPolicy: ClusterFirst??
vim nginx-prod-pod.yaml apiVersion: v1
kind: Pod metadata: labels: env: prod
name: nginx-prod spec:
containers:
- image: nginx name: nginx-prod
restartPolicy: Always
# kubectl create -f nginx-prod-pod.yaml
kubectl run --generator=run-pod/v1 --image=nginx -- labels=env=dev nginx-dev --dry-run -o yaml > nginx-dev-pod.yaml apiVersion: v1
kind: Pod metadata: labels: env: dev
name: nginx-dev
spec: containers:
- image: nginx name: nginx-dev
restartPolicy: Always
# kubectl create -f nginx-prod-dev.yaml Verify :
kubectl get po --show-labels kubectl get po -l env=prod kubectl get po -l env=dev
NEW QUESTION 8
Schedule a pod as follows:
Name: nginx-kusc00101
Image: nginx
Node selector: disk=ssd
Answer: A
Explanation:
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\6 B.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\6 C.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\6 D.JPG
NEW QUESTION 9
List ??nginx-dev?? and ??nginx-prod?? pod and delete those pods
Answer: A
Explanation:
kubect1 get pods -o wide
kubectl delete po ??nginx-dev??kubectl delete po ??nginx-prod??
NEW QUESTION 10
Ensure a single instance of podnginxis running on each node of theKubernetes cluster wherenginxalso represents the Image name whichhas to be used. Do not override anytaints currently in place.
UseDaemonSetto complete thistask and useds-kusc00201asDaemonSet name.
Answer: A
Explanation:
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\3 B.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\3 C.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\3 D.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\3 E.JPG
NEW QUESTION 11
......
P.S. Easily pass CKA Exam with 48 Q&As 2passeasy Dumps & pdf Version, Welcome to Download the Newest 2passeasy CKA Dumps: https://www.2passeasy.com/dumps/CKA/ (48 New Questions)