Use Free CKA Exam Questions that Stimulates Actual EXAM [Q17-Q38]

Share

Use Free CKA Exam Questions that Stimulates Actual EXAM

Get 100% Real CKA Free Online Practice Test


The CKA exam is intended for individuals who have experience working with Kubernetes and are looking to validate their skills and knowledge. It is also suitable for individuals who are new to Kubernetes but have experience working with other containerization platforms such as Docker. CKA exam is designed to test the skills of individuals at an intermediate to advanced level and is not intended for beginners.

 

NEW QUESTION # 17
Get list of all the pods showing name and namespace with a jsonpath expression.

Answer:

Explanation:
kubectl get pods -o=jsonpath="{.items[*]['metadata.name'
, 'metadata.namespace']}"


NEW QUESTION # 18
Check the Image version of nginx-dev pod using jsonpath

Answer:

Explanation:
kubect1 get po nginx-dev -o jsonpath='{.spec.containers[].image}{"\n"}'


NEW QUESTION # 19
Scale the deployment webserver to

Answer:

Explanation:
See the solution below.
Explanation
solution


NEW QUESTION # 20
Create a deployment spec file that will:
Launch 7 replicas of the nginx Image with the labelapp_runtime_stage=dev deployment name: kual00201 Save a copy of this spec file to /opt/KUAL00201/spec_deployment.yaml (or /opt/KUAL00201/spec_deployment.json).
When you are done, clean up (delete) any new Kubernetes API object that you produced during this task.

Answer:

Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\10 B.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\10 C.JPG


NEW QUESTION # 21
Create a nginx pod with label env=test in engineering namespace

Answer:

Explanation:
See the solution below.
Explanation
kubectl run nginx --image=nginx --restart=Never --labels=env=test --namespace=engineering --dry-run -o yaml > nginx-pod.yaml kubectl run nginx --image=nginx --restart=Never --labels=env=test --namespace=engineering --dry-run -o yaml | kubectl create -nengineering-f - YAML File:
apiVersion: v1
kind: Pod
metadata:
name: nginx
namespace: engineering
labels:
env: test
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
restartPolicy: Never
kubectl create -f nginx-pod.yaml


NEW QUESTION # 22
Print pod name and start time to "/opt/pod-status" file

Answer:

Explanation:
See the solution below.
Explanation
kubect1 get pods -o=jsonpath='{range
items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'


NEW QUESTION # 23
Scale the deployment webserver to

Answer:

Explanation:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\14 B.JPG


NEW QUESTION # 24
Create an nginx pod and load environment values from the above configmap "keyvalcfgmap" and exec into the pod and verify the environment variables and delete the pod

  • A. // first run this command to save the pod yaml
    kubectl run nginx --image=nginx --restart=Always --dry-run -o
    yaml > nginx-pod.yml
    // edit the yml to below file and create
    vim nginx-pod.yml
    apiVersion: v1
    name: nginx
    envFrom:
    - configMapRef:
    name: keyvalcfgmap
    restartPolicy: Always
    kubectl apply -f nginx-pod.yml
    // verify
    kubectl exec -it nginx -- env
    kubectl delete po nginx
  • B. // first run this command to save the pod yaml
    kubectl run nginx --image=nginx --restart=Always --dry-run -o
    yaml > nginx-pod.yml
    // edit the yml to below file and create
    vim nginx-pod.yml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    envFrom:
    - configMapRef:
    name: keyvalcfgmap
    restartPolicy: Always
    kubectl apply -f nginx-pod.yml
    // verify
    kubectl exec -it nginx -- env
    kubectl delete po nginx

Answer: B


NEW QUESTION # 25
List all the pods sorted by created timestamp

Answer:

Explanation:
See the solution below.
Explanation
kubect1 get pods--sort-by=.metadata.creationTimestamp


NEW QUESTION # 26
Remove taint added to node "worker-2"

Answer:

Explanation:
kubectl taint nodes worker-2 key:NoSchedule- // Verify You will see a message "node/worker-2 untainted" kubectl get nodes -o customcolumns=NAME:.metadata.name,TAINTS:.spec.taints --no-headers


NEW QUESTION # 27
Create a Job with an image node which prints node version and
verifies there is a pod created for this job

  • A. kubectl create job nodeversion --image=node -- node -v
    kubectl get job -w
    kubectl get pod
    YAML File:
    apiVersion: batch/v1
    kind: Job
    metadata:
    labels:
    job-name: nodeversion
    name: nodeversion
    spec:
    completions: 1
    parallelism: 1
    labels:
    job-name: nodeversion
    spec:
    containers:
    - command:
    - node
    - -v
    image: node
    imagePullPolicy: Always
    name: nodeversion
    restartPolicy: Never
  • B. kubectl create job nodeversion --image=node -- node -v
    kubectl get job -w
    kubectl get pod
    YAML File:
    apiVersion: batch/v1
    kind: Job
    metadata:
    labels:
    job-name: nodeversion
    name: nodeversion
    spec:
    completions: 1
    parallelism: 1
    selector:
    matchLabels:
    job-name: nodeversion
    template:
    metadata:
    labels:
    job-name: nodeversion
    spec:
    containers:
    - command:
    - node
    - -v
    image: node
    imagePullPolicy: Always
    name: nodeversion
    restartPolicy: Never

Answer: B


NEW QUESTION # 28
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 # 29
Create a pod as follows:
* Name: mongo
* Using Image: mongo
* In a new Kubernetes namespace named

Answer:

Explanation:
See the solution below.
Explanation
solution


NEW QUESTION # 30
Get list of PVs and order by size and write to file "/opt/pvstorage.txt"

Answer:

Explanation:
kubectl get pv --sort-by=.spec.capacity.storage > /opt/pv storage.txt


NEW QUESTION # 31
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 # 32
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 # 33
What are the differences between using a service versus using an application for Security Policy match?

  • A. Use of a "service" enables the firewall to take immediate action with the first observed packet based on port numbers. Use of an application allows the firewall to take action after enough packets allow for App-ID identification regardless of the ports being used
  • B. Use of a "service" enables the firewall to take action after enough packets allow for App-ID identification
  • C. There are no differences between "service" or "application." Use of an "application simplifies configuration by allowing use of a friendly application name instead of port numbers.
  • D. Use of a "service" enables the firewall to take immediate action with the first observed packet based on port numbers. Use of an "application allows the firewall to take immediate action if the port being used is a member of the application standard port list

Answer: D


NEW QUESTION # 34
Score: 13%

Task
A Kubernetes worker node, named wk8s-node-0 is in state NotReady. Investigate why this is the case, and perform any appropriate steps to bring the node to a Ready state, ensuring that any changes are made permanent.

Answer:

Explanation:
Solution:
sudo -i
systemctl status kubelet
systemctl start kubelet
systemctl enable kubelet


NEW QUESTION # 35
Score: 7%

Task
First, create a snapshot of the existing etcd instance running at https://127.0.0.1:2379, saving the snapshot to /srv/data/etcd-snapshot.db.

Next, restore an existing, previous snapshot located at /var/lib/backup/etcd-snapshot-previo us.db

Answer:

Explanation:
Solution:
#backup
ETCDCTL_API=3 etcdctl --endpoints="https://127.0.0.1:2379" --cacert=/opt/KUIN000601/ca.crt --cert=/opt/KUIN000601/etcd-client.crt --key=/opt/KUIN000601/etcd-client.key snapshot save /etc/data/etcd-snapshot.db
#restore
ETCDCTL_API=3 etcdctl --endpoints="https://127.0.0.1:2379" --cacert=/opt/KUIN000601/ca.crt --cert=/opt/KUIN000601/etcd-client.crt --key=/opt/KUIN000601/etcd-client.key snapshot restore /var/lib/backup/etcd-snapshot-previoys.db


NEW QUESTION # 36
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 # 37
Get the pods with labels env=dev and env=prod and output the labels as well

Answer:

Explanation:
kubectl get pods -l 'env in (dev,prod)' --show-labels


NEW QUESTION # 38
......


Average Salary of CNCF CKA Certification Exam Certified Professionals

The average salary of a CNCF CKA Certification Exam Outlook and Modules Exam Certified Expert in:

  • AU - 69,000 USD
  • India - 11,74,223 INR
  • USD - 87,000 USD
  • CA - 79,000 USD
  • UK - 75,000 USD

 

BEST Verified Linux Foundation CKA Exam Questions (2024) : https://prepcram.pass4guide.com/CKA-dumps-questions.html