[Dec-2021] Latest CKA Exam Dumps for Pass Guaranteed [Q35-Q51]

Share

[Dec-2021] Latest CKA Exam Dumps for Pass Guaranteed

Reliable Kubernetes Administrator CKA Dumps PDF Dec 18, 2021 Recently Updated Questions


For more info read reference:

Linux Foundation-CKA Official Certification Site

CNCF Website


Certification Path

There are no pre-requisites for Linux Foundation-CKA: Certified Kubernetes Administrator exam and the successful completion will give you the title of Certified Kubernetes Administrator


Who should take the Linux Foundation-CKA: Certified Kubernetes Administrator Exam

This certification will allow the candidate to be setup as a succesfull Kubernetes Administrator and will be able to know and work on the following things:

  • Kubernetes networking
  • Kubernetes cluster maintenance
  • Kubernetes security
  • Kubernetes logging and monitoring
  • Troubleshooting Kubernetes
  • Kubernetes scheduling
  • Kubernetes installation, configuration, and validation
  • Kubernetes core operations concepts
  • Kubernetes storage

 

NEW QUESTION 35
Create a Kubernetes secret asfollows:
* Name: super-secret
* password: bob
Create a pod namedpod-secrets-via-file Image, which mounts a secret namedsuper-secretat
/secrets.
Create a second pod namedpod-secrets-via-env Image, which exportspasswordas CONFIDENTIAL

Answer:

Explanation:
See the solution below.
Explanation
solution


 

NEW QUESTION 36
Scale the deployment webserver to

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 37
Score: 4%

Task
Schedule a pod as follows:
* Name: nginx-kusc00401
* Image: nginx
* Node selector: disk=ssd

Answer:

Explanation:
See the solution below.
Explanation
Solution:
#yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx-kusc00401
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
nodeSelector:
disk: spinning
#
kubectl create -f node-select.yaml

 

NEW QUESTION 38
Create a pod as follows:
* Name:mongo
* Using Image:mongo
* In anew Kubernetes namespacenamed:my-website

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 39
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:
See the solution below.
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 40
List all persistent volumes sorted bycapacity, saving the fullkubectloutput to
/opt/KUCC00102/volume_list. Usekubectl 's own functionality forsorting the output, and do not manipulate it any further.

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 41
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


 

NEW QUESTION 42
Make the node schedulable by uncordon the node

Answer:

Explanation:
kubectl uncordon node-1 //verify kubectl get no

 

NEW QUESTION 43
Get the memory and CPU usage of all the pods and find out top 3 pods which have the highest usage and put them into the cpuusage.txt file

  • A. // Get the top 3 pods
    kubectl top pod --all-namespaces | sort --reverse --key 3 --
    numeric | head -8
    // putting into file
    kubectl top pod --all-namespaces | sort --reverse --key 6 --
    numeric | head -6 > cpu-usage.txt
    // verify
    cat cpu-usage.txt
  • B. // Get the top 3 pods
    kubectl top pod --all-namespaces | sort --reverse --key 3 --
    numeric | head -3
    // putting into file
    kubectl top pod --all-namespaces | sort --reverse --key 3 --
    numeric | head -3 > cpu-usage.txt
    // verify
    cat cpu-usage.txt

Answer: B

 

NEW QUESTION 44
Create a Pod with three busy box containers with commands "ls; sleep 3600;", "echo Hello World; sleep 3600;" and "echo this is the third container; sleep 3600" respectively and check the status

  • A. // first create single container pod with dry run flag
    kubectl run busybox --image=busybox --restart=Always --dry-run
    -o yaml -- bin/sh -c "sleep 3600; ls" > multi-container.yaml
    // edit the pod to following yaml and create it
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: busybox
    name: busybox
    spec:
    containers:
    - args:
    - bin/sh
    - -c
    - ls; sleep 3600
    image: busybox
    name: busybox-container-1
    - args:
    - bin/sh
    - -c
    - echo Hello world; sleep 3600
    image: busybox
    name: busybox-container-2
    - args:
    - bin/sh
    - -c
    - echo this is third container; sleep 3600
    image: busybox
    name: busybox-container-3
    restartPolicy: Always
    // Verify
    Kubectl get pods
  • B. // first create single container pod with dry run flag
    kubectl run busybox --image=busybox --restart=Always --dry-run
    -o yaml -- bin/sh -c "sleep 3600; ls" > multi-container.yaml
    // edit the pod to following yaml and create it
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: busybox
    name: busybox
    spec:
    containers:
    - args:
    - bin/sh
    - -c
    - ls; sleep 3600
    - echo Hello world; sleep 3600
    image: busybox
    name: busybox-container-2
    - args:
    - bin/sh
    - -c
    - echo this is third container; sleep 3600
    image: busybox
    name: busybox-container-3
    restartPolicy: Always
    // Verify
    Kubectl get pods

Answer: A

 

NEW QUESTION 45
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 46
Create a snapshot of the etcd instance running at https://127.0.0.1:2379, saving the snapshot to the file path
/srv/data/etcd-snapshot.db.
The following TLS certificates/key are supplied for connecting to the server with etcdctl:
* 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 47
Create a deployment called webapp with image nginx having 5 replicas in it, put the file in /tmp directory with named webapp.yaml

  • A. //Create a file using dry run command
    kubectl create deploy --image=nginx --dry-run -o yaml >
    /tmp/webapp.yaml
    // Now, edit file webapp.yaml and update replicas=5
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
    app: webapp
    name: webapp
    spec:
    replicas: 5
    selector:
    matchLabels:
    app: webapp
    template:
    metadata:
    labels:
    Note: Search "deployment" in kubernetes.io site , you will get
    the page
    https://kubernetes.io/docs/concepts/workloads/controllers/deplo
    yment/
    // Verify the Deployment
    kubectl get deploy webapp --show-labels
    // Output the YAML file of the deployment webapp
    kubectl get deploy webapp -o yaml
  • B. //Create a file using dry run command
    kubectl create deploy --image=nginx --dry-run -o yaml >
    /tmp/webapp.yaml
    // Now, edit file webapp.yaml and update replicas=5
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
    app: webapp
    name: webapp
    spec:
    replicas: 5
    selector:
    matchLabels:
    app: webapp
    template:
    metadata:
    labels:
    app: webapp
    spec:
    containers:
    - image: nginx
    name: nginx
    Note: Search "deployment" in kubernetes.io site , you will get
    the page
    https://kubernetes.io/docs/concepts/workloads/controllers/deplo
    yment/
    // Verify the Deployment
    kubectl get deploy webapp --show-labels
    // Output the YAML file of the deployment webapp
    kubectl get deploy webapp -o yaml

Answer: B

 

NEW QUESTION 48
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 49
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 50
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:
See the solution below.
Explanation
solution


 

NEW QUESTION 51
......

Latest 2021 Realistic Verified CKA Dumps: https://www.exam4docs.com/CKA-study-questions.html

Pass Your  Linux Foundation CKA Exam with Correct 63 Questions and Answers: https://drive.google.com/open?id=1Ndy1F1SmTh4sn-BcsF7ItIQhrVm-5OzV