Updated Dec-2021 Exam Engine for CKA Exam Free Demo & 365 Day Updates [Q19-Q36]

Share

Updated Dec-2021 Exam Engine for CKA Exam Free Demo & 365 Day Updates

Exam Passing Guarantee CKA Exam with Accurate Quastions!


Linux Foundation CKA Exam Syllabus Topics:

TopicDetails
Topic 1
  • Understand host networking configuration on the cluster nodes
  • Evaluate cluster and node logging
Topic 2
  • Understand connectivity between Pods
  • Troubleshoot application failure
  • Use Kubeadm to install a basic cluster
Topic 3
  • Awareness of manifest management and common templating tools
  • Understand storage classes, persistent volumes
Topic 4
  • Perform a version upgrade on a Kubernetes cluster using Kubeadm
  • Understand volume mode, access modes and reclaim policies for volumes
Topic 5
  • Understand ClusterIP, NodePort, LoadBalancer service types and endpoints
  • Understand persistent volume claims primitive
Topic 6
  • Understand how resource limits can affect Pod scheduling
  • Use ConfigMaps and Secrets to configure applications

 

NEW QUESTION 19
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 namespace and the volume must not be persistent.

Answer:

Explanation:
See the solution below.
Explanation
solution


 

NEW QUESTION 20
Create a daemonset named "Prometheus-monitoring" using image=prom/Prometheus which runs in all the nodes in the cluster. Verify the pod running in all the nodes

  • A. vim promo-ds.yaml
    apiVersion: apps/v1
    kind: DaemonSet
    metadata:
    name: prometheus-monitoring
    spec:
    selector:
    matchLabels:
    name: prometheus
    template:
    metadata:
    labels:
    name: prometheus
    spec:
    tolerations:
    # remove it if your masters can't run pods
    - key: node-role.kubernetes.io/master
    effect: NoSchedule
    containers:
    - name: prometheus-container
    image: prom/prometheus
    volumeMounts:
    - name: varlog
    mountPath: /var/log
    - name: varlibdockercontainers
    mountPath: /var/lib/docker/containers
    readOnly: true
    volumes:
    - name: varlog
    emptyDir: {}
    - name: varlibdockercontainers
    emptyDir: {}
    kubectl apply -f promo-ds.yaml
    NOTE: Deamonset will get scheduled to "default" namespace, to
    schedule deamonset in specific namespace, then add
    "namespace" field in metadata
    //Verify
    kubectl get ds
    NAME DESIRED CURRENT READY UP-TO-DATE
    AVAILABLE NODE SELECTOR AGE
    prometheus-monitoring 6 6 0 6
    0 <none> 7s
    kubectl get no # To get list of nodes in the cluster
    // There are 6 nodes in the cluster, so a pod gets scheduled to
    each node in the cluster
  • B. vim promo-ds.yaml
    apiVersion: apps/v1
    kind: DaemonSet
    metadata:
    name: prometheus-monitoring
    spec:
    selector:
    matchLabels:
    name: prometheus
    template:
    metadata:
    labels:
    name: prometheus
    spec:
    tolerations:
    # remove it if your masters can't run pods
    - key: node-role.kubernetes.io/master
    effect: NoSchedule
    containers:
    - name: prometheus-container
    - name: varlibdockercontainers
    mountPath: /var/lib/docker/containers
    readOnly: true
    volumes:
    - name: varlog
    emptyDir: {}
    - name: varlibdockercontainers
    emptyDir: {}
    kubectl apply -f promo-ds.yaml
    NOTE: Deamonset will get scheduled to "default" namespace, to
    schedule deamonset in specific namespace, then add
    "namespace" field in metadata
    //Verify
    kubectl get ds
    NAME DESIRED CURRENT READY UP-TO-DATE
    AVAILABLE NODE SELECTOR AGE
    prometheus-monitoring 8 8 0 6
    0 <none> 7s
    kubectl get no # To get list of nodes in the cluster
    // There are 6 nodes in the cluster, so a pod gets scheduled to
    each node in the cluster

Answer: A

 

NEW QUESTION 21
Apply the autoscaling to this deployment with minimum 10 and maximum 20 replicas and target CPU of 85% and verify hpa is created and replicas are increased to 10 from 1

Answer:

Explanation:
kubectl autoscale deploy webapp --min=10 --max=20 --cpu percent=85 kubectl get hpa kubectl get pod -l app=webapp

 

NEW QUESTION 22
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 23
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 24
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 25
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 26
Create the deployment redis with image=redis and expose it with "NodePort" service redis-service

  • A. kubectl create deploy redis --image=redis --dry-run -o yaml >
    redis-deploy.yaml
    Edit redis-deploy.yaml file
    name: redis
    spec:
    replicas: 1
    selector:
    matchLabels:
    app: redis
    template:
    metadata:
    labels:
    app: redis
    spec:
    containers:
    - image: redis
    name: redis
    //Creating Service
    kubectl expose deploy redis --type=NodePort --port=6379 --
    target-port=6379 --name redis-service
    // Verify
    kubectl get deploy,svc
  • B. kubectl create deploy redis --image=redis --dry-run -o yaml >
    redis-deploy.yaml
    Edit redis-deploy.yaml file
    vim redis-deploy.yaml
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
    app: redis
    name: redis
    spec:
    replicas: 1
    selector:
    matchLabels:
    app: redis
    template:
    metadata:
    labels:
    app: redis
    spec:
    containers:
    - image: redis
    name: redis
    //Creating Service
    kubectl expose deploy redis --type=NodePort --port=6379 --
    target-port=6379 --name redis-service
    // Verify
    kubectl get deploy,svc

Answer: B

 

NEW QUESTION 27
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 28
Create a Kubernetes secret as follows:
* Name: super-secret
* password: bob
Create a pod named pod-secrets-via-file, using the redis Image, which mounts a secret named super-secret at
/secrets.

Answer:

Explanation:
Create a second pod named pod-secrets-via-env, using the redis Image, which exports password as CONFIDENTIAL See the solution below.
Explanation
solution


 

NEW QUESTION 29
Verify certificate expiry date for ca certificate in /etc/kubernetes/pki

Answer:

Explanation:
openssl x509 -in ca.crt -noout -text | grep -i validity -A 4

 

NEW QUESTION 30
Create a Pod nginx and specify a CPU request and a CPU limit of 0.5 and 1 respectively.

  • A. // create a yml file
    kubectl run nginx-pod --image=nginx --restart=Never --dry-run -
    o yaml > nginx-pod.yml
    // add the resources section and create
    vim nginx-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    resources:
    requests:
    cpu: "0.5"
    limits:
    cpu: "1"
    restartPolicy: Always
    kubectl apply -f nginx-pod.yaml
    // verify
    kubectl top pod
  • B. // create a yml file
    kubectl run nginx-pod --image=nginx --restart=Never --dry-run -
    o yaml > nginx-pod.yml
    // add the resources section and create
    vim nginx-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    resources:
    requests:
    cpu: "0.4"
    limits:
    cpu: "1"
    restartPolicy: Always
    kubectl apply -f nginx-pod.yaml
    // verify
    kubectl top pod

Answer: A

 

NEW QUESTION 31
Ensure a single instance of pod nginx is running on each node of the Kubernetes cluster where nginx also represents the Image name which has to be used. Do not override any taints currently in place.
Use DaemonSet to complete this task and use ds-kusc00201 as DaemonSet name.

Answer:

Explanation:
See the solution below.
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 32
Deployment
a. Create a deployment of webapp with image nginx:1.17.1 with
container port 80 and verify the image version

  • A. // Create initial YAML file with -dry-run option
    kubectl create deploy webapp --image=nginx:1.17.1 --dryrun=client -o yaml > webapp.yaml vim webapp.yaml apiVersion: apps/v1 kind: Deployment metadata:
    labels:
    app: webapp
    name: webapp
    spec: replicas: 1 containers: - image: nginx:1.17.1 name: nginx kubectl create -f webapp.yaml -record=true //Verify Image Version kubectl describe deploy webapp | grep -i "Image" Using JsonPath kubectl get deploy -o=jsonpath='{range.items [*]}{.[*]} {.metadata.name}{"\t"}{.spec.template.spec.containers[*].i mage}{"\n"}'
  • B. // Create initial YAML file with -dry-run option
    kubectl create deploy webapp --image=nginx:1.17.1 --dryrun=client -o yaml > webapp.yaml vim webapp.yaml apiVersion: apps/v1 kind: Deployment metadata:
    labels:
    app: webapp
    name: webapp
    spec: replicas: 1 selector: matchLabels: app: webapp template: metadata: labels: app: webapp spec: containers: - image: nginx:1.17.1 name: nginx kubectl create -f webapp.yaml -record=true //Verify Image Version kubectl describe deploy webapp | grep -i "Image" Using JsonPath kubectl get deploy -o=jsonpath='{range.items [*]}{.[*]} {.metadata.name}{"\t"}{.spec.template.spec.containers[*].i mage}{"\n"}'

Answer: B

 

NEW QUESTION 33
An administrator accidentally closed the commit window/screen before the commit was finished. Which two options could the administrator use to verify the progress or success of that commit task? (Choose two)

  • A. Task Manager
  • B. Traffic Logs
  • C. System Logs
  • D. Configuration Logs

Answer: A,D

 

NEW QUESTION 34
Score:7%

Context
An existing Pod needs to be integrated into the Kubernetes built-in logging architecture (e. g. kubectl logs).
Adding a streaming sidecar container is a good and common way to accomplish this requirement.
Task
Add a sidecar container named sidecar, using the busybox Image, to the existing Pod big-corp-app. The new sidecar container has to run the following command:
/bin/sh -c tail -n+1 -f /va r/log/big-corp-app.log
Use a Volume, mounted at /var/log, to make the log file big-corp-app.log available to the sidecar container.

Answer:

Explanation:
See the solution below.
Explanation
Solution:
#
kubectl get pod big-corp-app -o yaml
#
apiVersion: v1
kind: Pod
metadata:
name: big-corp-app
spec:
containers:
- name: big-corp-app
image: busybox
args:
- /bin/sh
- -c
- >
i=0;
while true;
do
echo "$(date) INFO $i" >> /var/log/big-corp-app.log;
i=$((i+1));
sleep 1;
done
volumeMounts:
- name: logs
mountPath: /var/log
- name: count-log-1
image: busybox
args: [/bin/sh, -c, 'tail -n+1 -f /var/log/big-corp-app.log']
volumeMounts:
- name: logs
mountPath: /var/log
volumes:
- name: logs
emptyDir: {
}
#
kubectl logs big-corp-app -c count-log-1

 

NEW QUESTION 35
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 36
......


Understanding of functional and technical aspects of Troubleshooting

Detect, diagnose, and remedy a variety of Kubernetes failures at the network, node, control-plane, and application levels. You will use tools included in Kubernetes, such as kubectl, as well as a variety of Linux operating system tools like systemctl, journalctl, ss, and openssl to build a comprehensive Kubernetes troubleshooting toolkit.

The following will be discussed in CNCF CKA dumps:

  • Troubleshoot networking
  • Evaluate cluster and node logging
  • Troubleshoot Kubernetes application failures
  • Manage container stdout & stderr logs
  • Troubleshoot Kubernetes component failures
  • Troubleshoot application failure
  • Troubleshoot Kubernetes node failures
  • Understand how to monitor applications
  • Troubleshoot Kubernetes connection failures
  • Troubleshoot cluster component failure

 

Exam Questions for CKA Updated Versions With Test Engine: https://www.actualcollection.com/CKA-exam-questions.html

Test Engine to Practice Test for CKA Valid and Updated Dumps: https://drive.google.com/open?id=1z7y77d4pyQxcwz1WWK1ZoqpLxKjleHv_