Pass Linux Foundation Certified Kubernetes Administrator (CKA) Program Exam Exam in First Attempt Guaranteed Updated Dump from VCE4Dumps!
Pass CKA Exam with 63 Questions - Verified By VCE4Dumps
NEW QUESTION 10
Scale the deploymentwebserverto6pods.
Answer:
Explanation:
See the solution below.
Explanation
solution
NEW QUESTION 11
Create a deployment as follows:
* Name:nginx-random
* Exposed via a servicenginx-random
* Ensure that the service & podare accessible via theirrespective DNS records
* The container(s) within anypod(s) running as a part of thisdeployment should use thenginxImage Next, use the utilitynslookupto lookup the DNS records of the service &pod and write the output to
/opt/KUNW00601/service.dnsand/opt/KUNW00601/pod.dnsrespectively.
Answer:
Explanation:
See the solution below.
Explanation
Solution:


NEW QUESTION 12
Given a partially-functioning Kubernetes cluster, identify symptoms of failure on the cluster.
Determine the node, the failing service, and take actions to bring up the failed service and restore the health of the cluster. Ensure that any changes are made permanently.
You can ssh to the relevant I nodes (
[student@node-1] $ ssh <nodename
You can assume elevated privileges on any node in the cluster with the following command:
[student@nodename] $ | sudo -i
Answer:
Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\23 C.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\23 D.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\23 E.JPG
NEW QUESTION 13
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
NEW QUESTION 14
Set CPU and memory requests and limits for existing pod name
"nginx-prod".
Set requests for CPU and Memory as 100m and 256Mi respectively
Set limits for CPU and Memory as 200m and 512Mi respectively
- A. kubectl get po
kubectl set resources po nginx-prod --
limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi
//Verify
kubectl top po
kubectl describe po nginx-prod - B. kubectl get po
kubectl set resources po nginx-prod --
limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi
//Verify
kubectl describe po nginx-prod
Answer: A
NEW QUESTION 15
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 16
Create a snapshot of theetcdinstance running at , saving thesnapshot to the file path
/srv/data/etcd-snapshot.db.
The following TLScertificates/key are suppliedfor connecting to the server withetcdctl:
* CA certificate:/opt/KUCM00302/ca.crt
* Client certificate:/opt/KUCM00302/etcd-client.crt
* Client key:Topt/KUCM00302/etcd-client.key
Answer:
Explanation:
See the solution below.
Explanation
solution
NEW QUESTION 17
Deploy a pod with image=redis on a node with label disktype=ssd
- A. // Get list of nodes
kubectl get nodes
//Get node with the label disktype=ssd
kubectl get no -l disktype=ssd
// Create a sample yaml file
kubectl run node-redis --generator=run-pod/v1 --image=redis --dry
run -o yaml > test-redis.yaml
// Edit test-redis.yaml file and add nodeSelector
vim test-redis.yaml
apiVersion: v1
- name: node-redis
image: redis
imagePullPolicy: IfNotPresent
kubectl apply -f test-redis.yaml
/ // Verify
K kubectl get po -o wide - B. // Get list of nodes
kubectl get nodes
//Get node with the label disktype=ssd
kubectl get no -l disktype=ssd
// Create a sample yaml file
kubectl run node-redis --generator=run-pod/v1 --image=redis --dry
run -o yaml > test-redis.yaml
// Edit test-redis.yaml file and add nodeSelector
vim test-redis.yaml
apiVersion: v1
kind: Pod
metadata:
name: redis
spec:
nodeSelector:
disktype: ssd
containers:
- name: node-redis
image: redis
imagePullPolicy: IfNotPresent
kubectl apply -f test-redis.yaml
/ // Verify
K kubectl get po -o wide
Answer: B
NEW QUESTION 18
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:
See the solution below.
Explanation
solution




NEW QUESTION 19
Create a namespace called 'development' and a pod with image nginx called nginx on this namespace.
Answer:
Explanation:
See the solution below.
Explanation
kubectl create namespace development
kubectl run nginx --image=nginx --restart=Never -n development
NEW QUESTION 20
Check the rollout history and make sure everything is ok after the update
- A. kubectl rollout history deploy webapp
kubectl get deploy webapp --show-labels
kubectl get rs -
kubectl get po -l app=webapp - B. kubectl rollout history deploy webapp
kubectl get deploy webapp --show-labels
kubectl get rs -l app=webapp
kubectl get po -l app=webapp
Answer: B
NEW QUESTION 21
Create a file:
/opt/KUCC00302/kucc00302.txt that lists all pods that implement service baz in namespace development.
The format of the file should be one pod name per line.
Answer:
Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\11 B.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\11 C.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\11 D.JPG
NEW QUESTION 22
Create a ETCD backup of kubernetes cluster
Note : You don't need to memorize command, refer -
https://kubernetes.io/docs/tasks/administer-cluster/configureupgrade-etcd/ during exam
- A. ETCDCTL_API=3 etcdctl --endpoints=[ENDPOINT] --cacert=[CA CERT]
--cert=[ETCD SERVER CERT] --key=[ETCD SERVER KEY] snapshot save
[BACKUP FILE NAME]
In exam, cluster setup is done with kubeadm , this means ETCD
used by the kubernetes cluster is coming from static pod.
kubectl get pod -n kube-system
kubectl describe pod etcd-master -n kube-system
You can locate the information on
endpoint: - advertise-client-urls=https://172.17.0.15:2379
ca certificate: - trusted-cafile=/etc/kubernetes/pki/etcd/ca.crt
server certificate : - certfile=/etc/kubernetes/pki/etcd/server.crt
key: - key-file=/etc/kubernetes/pki/etcd/server.key
To Create backup
export ETCDCTL_API=3
(or)
ETCDCTL_API=3 etcdctl ETCDCTL_API=3 etcdctl --
endpoints=https://172.17.0.15:2379 --
cacert=/etc/kubernetes/pki/etcd/ca.crt --
cert=/etc/kubernetes/pki/etcd/server.crt --
key=/etc/kubernetes/pki/etcd/server.key snapshot save etcdsnapshot.db
//Verify
ETCDCTL_API=3 etcdctl --write-out=table snapshot status
snapshot.db - B. ETCDCTL_API=3 etcdctl --endpoints=[ENDPOINT] --cacert=[CA CERT]
--cert=[ETCD SERVER CERT] --key=[ETCD SERVER KEY] snapshot save
[BACKUP FILE NAME]
In exam, cluster setup is done with kubeadm , this means ETCD
used by the kubernetes cluster is coming from static pod.
kubectl get pod -n kube-system
kubectl describe pod etcd-master -n kube-system
You can locate the information on
endpoint: - advertise-client-urls=https://172.16.0.18:2379
ca certificate: - trusted-cafile=/etc/kubernetes/pki/etcd/ca.crt
server certificate : - certfile=/etc/kubernetes/pki/etcd/server.crt
key: - key-file=/etc/kubernetes/pki/etcd/server.key
To Create backup
export ETCDCTL_API=3
(or)
ETCDCTL_API=3 etcdctl ETCDCTL_API=3 etcdctl --
endpoints=https://172.17.0.15:2379 --
key=/etc/kubernetes/pki/etcd/server.key snapshot save etcdsnapshot.db
//Verify
ETCDCTL_API=3 etcdctl --write-out=table snapshot status
snapshot.db
Answer: A
NEW QUESTION 23
Create a namespace called 'development' and a pod with image nginx called nginx on this namespace.
Answer:
Explanation:
kubectl create namespace development kubectl run nginx --image=nginx --restart=Never -n development
NEW QUESTION 24
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:
Explanation:
See the solution below.
Explanation
solution



NEW QUESTION 25
Pause the rollout of the deployment
Answer:
Explanation:
kubectl rollout pause deploy webapp
NEW QUESTION 26
Delete the pod without any delay (force delete)
Answer:
Explanation:
Kubect1 delete po "POD-NAME" --grace-period=0 --force
NEW QUESTION 27
Create a pod with environment variables as var1=value1.Check the environment variable in pod
Answer:
Explanation:
See the solution below.
Explanation
kubectl run nginx --image=nginx --restart=Never --env=var1=value1
# then
kubectl exec -it nginx -- env
# or
kubectl exec -it nginx -- sh -c 'echo $var1'
# or
kubectl describe po nginx | grep value1
NEW QUESTION 28
List all the pods showing name and namespace with a json path expression
Answer:
Explanation:
kubectl get pods -o=jsonpath="{.items[*]['metadata.name', 'metadata.namespace']}"
NEW QUESTION 29
Score: 7%
Task
Given an existing Kubernetes cluster running version 1.20.0, upgrade all of the Kubernetes control plane and node components on the master node only to version 1.20.1.
Be sure to drain the master node before upgrading it and uncordon it after the upgrade.
You are also expected to upgrade kubelet and kubectl on the master node.
Answer:
Explanation:
See the solution below.
Explanation
SOLUTION:
[student@node-1] > ssh ek8s
kubectl cordon k8s-master
kubectl drain k8s-master --delete-local-data --ignore-daemonsets --force apt-get install kubeadm=1.20.1-00 kubelet=1.20.1-00 kubectl=1.20.1-00 --disableexcludes=kubernetes kubeadm upgrade apply 1.20.1 --etcd-upgrade=false systemctl daemon-reload systemctl restart kubelet kubectl uncordon k8s-master
NEW QUESTION 30
......
Penetration testers simulate CKA exam: https://www.vce4dumps.com/CKA-valid-torrent.html
Free Test Engine For Certified Kubernetes Administrator (CKA) Program Exam Certification Exams: https://drive.google.com/open?id=1LMFc2bMvqBFF-wEYADnNOrB6Tm00jWGX