Try Before You Buy

Download a free sample of any of our exam questions and answers

  • 24/7 customer support, Secure shopping site
  • Free One year updates to match real exam scenarios
  • If you failed your exam after buying our products we will refund the full amount back to you.

New VCE4Dumps CKA Exam Questions Real CKA Dumps Updated on Mar 13, 2024 [Q20-Q37]

Share

New VCE4Dumps CKA Exam Questions| Real CKA Dumps Updated on Mar 13, 2024

CKA Braindumps – CKA Questions to Get Better Grades


Linux Foundation offers a comprehensive training program to prepare candidates for the CKA exam. The training program includes online courses, hands-on labs, and practice exams. The program is designed to help candidates gain the necessary knowledge and skills to pass the exam and become certified Kubernetes administrators.

 

NEW QUESTION # 20
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 # 21
Monitor the logs of pod foo and:
* Extract log lines corresponding to error
unable-to-access-website
* Write them to/opt/KULM00201/foo

Answer:

Explanation:
See the solution below.
Explanation
solution


NEW QUESTION # 22
Create a file:
/opt/KUCC00302/kucc00302.txtthatlists all pods that implement servicebazin namespacedevelopment.
The format of the file should be onepod name per line.

Answer:

Explanation:
See the solution below.
Explanation
solution



NEW QUESTION # 23
Create a pod with environment variables as var1=value1.Check the environment variable in pod

Answer:

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 # 24
Get list of persistent volumes and persistent volume claim in the cluster

Answer:

Explanation:
kubectl get pv kubectl get pvc


NEW QUESTION # 25
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 # 26
What is the maximum number of samples that can be submitted to WildFire manually per day?

  • A. 1,000
  • B. 15,000
  • C. 5,000
  • D. 2,000

Answer: A


NEW QUESTION # 27
Score:7%

Task
Create a new PersistentVolumeClaim
* Name: pv-volume
* Class: csi-hostpath-sc
* Capacity: 10Mi
Create a new Pod which mounts the PersistentVolumeClaim as a volume:
* Name: web-server
* Image: nginx
* Mount path: /usr/share/nginx/html
Configure the new Pod to have ReadWriteOnce
Finally, using kubectl edit or kubectl patch PersistentVolumeClaim to a capacity of 70Mi and record that change.

Answer:

Explanation:
See the solution below.
Explanation
Solution:
vi pvc.yaml
storageclass pvc
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-volume
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 10Mi
storageClassName: csi-hostpath-sc
# vi pod-pvc.yaml
apiVersion: v1
kind: Pod
metadata:
name: web-server
spec:
containers:
- name: web-server
image: nginx
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: my-volume
volumes:
- name: my-volume
persistentVolumeClaim:
claimName: pv-volume
# craete
kubectl create -f pod-pvc.yaml
#edit
kubectl edit pvc pv-volume --record


NEW QUESTION # 28
Watch the job that runs 10 times one by one and verify 10 pods are created and delete those after it's completed

Answer:

Explanation:
kubectl get job -w kubectl get po kubectl delete job hello-job


NEW QUESTION # 29
Create a busybox pod and add "sleep 3600" command

Answer:

Explanation:
kubectl run busybox --image=busybox --restart=Never -- /bin/sh -c
"sleep 3600"


NEW QUESTION # 30
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 # 31
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 # 32
Create 5 nginx pods in which two of them is labeled env=prod and
three of them is labeled env=dev

  • A. kubectl run nginx-dev1 --image=nginx --restart=Never --
    labels=env=dev
    kubectl run nginx-dev2 --image=nginx --restart=Never --
    labels=env=dev
    kubectl run nginx-dev3 --image=nginx --restart=Never --
    labels=env=dev
    kubectl run nginx-prod1 --image=nginx --restart=Never --
    labels=env=prod
    kubectl run nginx-prod2 --image=nginx --restart=Never --
    labels=env=prod
  • B. kubectl run nginx-dev1 --image=nginx --restart=Never --
    labels=env=dev
    kubectl run nginx-dev2 --image=nginx --restart=Never --
    labels=env=dev
    kubectl run nginx-prod1 --image=nginx --restart=Never --
    labels=env=prod
    kubectl run nginx-prod2 --image=nginx --restart=Never --
    labels=env=prod

Answer: A


NEW QUESTION # 33
Pause the rollout of the deployment

Answer:

Explanation:
kubectl rollout pause deploy webapp


NEW QUESTION # 34
Create a Cronjob with busybox image that prints date and hello from kubernetes cluster message for every minute

  • A. CronJob Syntax:
    * --> Minute
    * --> Hours
    * --> Day of The Month
    * --> Month
    * --> Day of the Week
    */1 * * * * --> Execute a command every one minutes.
    vim date-job.yaml
    apiVersion: batch/v1beta1
    kind: CronJob
    metadata:
    name: date-job
    spec:
    schedule: "*/1 * * * *"
    jobTemplate:
    spec:
    template:
    spec:
    containers:
    - name: hello
    image: busybox
    args:
    - /bin/sh
    - -c
    - date; echo Hello from the Kubernetes cluster
    restartPolicy: OnFailure
    kubectl apply -f date-job.yaml
    //Verify
    kubectl get cj date-job -o yaml
  • B. CronJob Syntax:
    * --> Minute
    * --> Hours
    * --> Day of The Month
    * --> Month
    * --> Day of the Week
    */1 * * * * --> Execute a command every one minutes.
    vim date-job.yaml
    apiVersion: batch/v1beta1
    kind: CronJob
    metadata:
    name: date-job
    spec:
    schedule: "*/1 * * * *"
    jobTemplate:
    spec:
    template:
    - /bin/sh
    - -c
    - date; echo Hello from the Kubernetes cluster
    restartPolicy: OnFailure
    kubectl apply -f date-job.yaml
    //Verify
    kubectl get cj date-job -o yaml

Answer: A


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

Answer:

Explanation:
solution



NEW QUESTION # 36
For this item, you will have to ssh and complete all tasks on these
nodes. Ensure that you return to the base node (hostname: ) when you have completed this item.
Context
As an administrator of a small development team, you have been asked to set up a Kubernetes cluster to test the viability of a new application.
Task
You must use kubeadm to perform this task. Any kubeadm invocations will require the use of the
--ignore-preflight-errors=all option.
Configure the node ik8s-master-O as a master node. .
Join the node ik8s-node-o to the cluster.

Answer:

Explanation:
See the solution below.
Explanation
solution
You must use the kubeadm configuration file located at /etc/kubeadm.conf when initializingyour cluster.
You may use any CNI plugin to complete this task, but if you don't have your favourite CNI plugin's manifest URL at hand, Calico is one popular option:
https://docs.projectcalico.org/v3.14/manifests/calico.yaml
Docker is already installed on both nodes and apt has been configured so that you can install the required tools.


NEW QUESTION # 37
......

CKA Exam Dumps - Try Best CKA Exam Questions: https://www.vce4dumps.com/CKA-valid-torrent.html

Get New CKA Certification – Valid Exam Dumps Questions: https://drive.google.com/open?id=10DRBWoym3XfUnl1IWPgQdiKYMuWddqHj