[Aug 01, 2023] 100% Pass Guarantee for CKA Dumps with Actual Exam Questions [Q27-Q52]

Share

[Aug 01, 2023] 100% Pass Guarantee for CKA Dumps with Actual Exam Questions

Today Updated CKA Exam Dumps Actual Questions

NEW QUESTION # 27
Get the list of pods of webapp deployment

  • A. // Get the label of the deployment
    kubectl get deploy --show-labels
    // Get the pods with that label
    kubectl get pods -l app=webapp
  • B. // Get the label of the deployment
    kubectl get deploy --show-labels
    kubectl get pods -l app=webapp

Answer: A


NEW QUESTION # 28
Create an nginx pod and list the pod with different levels of verbosity

Answer:

Explanation:
// create a pod
kubectl run nginx --image=nginx --restart=Never --port=80
// List the pod with different verbosity
kubectl get po nginx --v=7
kubectl get po nginx --v=8
kubectl get po nginx --v=9


NEW QUESTION # 29
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 -3
    // putting into file
    kubectl top pod --all-namespaces | sort --reverse --key 3 --
    numeric | head -3 > 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 -8
    // putting into file
    kubectl top pod --all-namespaces | sort --reverse --key 6 --
    numeric | head -6 > cpu-usage.txt
    // verify
    cat cpu-usage.txt

Answer: A


NEW QUESTION # 30
From the pod label name=cpu-utilizer, find pods running high CPU workloads and write the name of the pod consuming most CPU to the file /opt/KUTR00102/KUTR00102.txt (which already exists).

Answer:

Explanation:
solution


NEW QUESTION # 31
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 # 32
Create a deployment as follows:
Name: nginx-random
Exposed via a service nginx-random
Ensure that the service & pod are accessible via their respective DNS records The container(s) within any pod(s) running as a part of this deployment should use the nginx Image Next, use the utility nslookup to look up the DNS records of the service & pod and write the output to
/opt/KUNW00601/service.dns and /opt/KUNW00601/pod.dns respectively.

Answer:

Explanation:
See the solution below.
Explanation
Solution:
F:\Work\Data Entry Work\Data Entry\20200827\CKA\17 C.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\17 D.JPG

F:\Work\Data Entry Work\Data Entry\20200827\CKA\17 E.JPG


NEW QUESTION # 33
Create a busybox pod that runs the command "env" and save the output to "envpod" file

Answer:

Explanation:
See the solution below.
Explanation
kubectl run busybox --image=busybox --restart=Never --rm -it -- env > envpod.yaml


NEW QUESTION # 34
Set the node namedek8s-node-1asunavailable and reschedule all thepods running on it.

Answer:

Explanation:
See the solution below.
Explanation
solution


NEW QUESTION # 35
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 # 36
Create the nginx pod with version 1.17.4 and expose it on port 80

Answer:

Explanation:
kubectl run nginx --image=nginx:1.17.4 --restart=Never -- port=80


NEW QUESTION # 37
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 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"}'
  • 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 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: A


NEW QUESTION # 38
Create and configure the servicefront-end-serviceso it's accessiblethroughNodePortand routes to theexisting pod namedfront-end.

Answer:

Explanation:
See the solution below.
Explanation
solution


NEW QUESTION # 39
Create PersistentVolume named task-pv-volume with storage 10Gi, access modes ReadWriteMany, storageClassName manual, and volume at /mnt/data and Create a PersistentVolumeClaim of at least 3Gi storage and access mode ReadWriteOnce and verify

  • A. vim task-pv-volume.yaml
    apiVersion: v1
    kind: PersistentVolume
    metadata:
    name: task-pv-volume
    labels:
    type: local
    spec:
    storageClassName: manual
    capacity:
    storage: 10Gi
    accessModes:
    - ReadWriteMany
    hostPath:
    path: "/mnt/data"
    kubectl apply -f task-pv-volume.yaml
    //Verify
    kubectl get pv
    vim task-pvc-volume.yaml
    apiVersion: v1
    - ReadWriteMany
    resources:
    requests:
    storage: 3Gi
    kubectl apply -f task-pvc-volume.yaml
    //Verify
    Kuk kubectl get pvc
  • B. vim task-pv-volume.yaml
    apiVersion: v1
    kind: PersistentVolume
    metadata:
    name: task-pv-volume
    labels:
    type: local
    spec:
    storageClassName: manual
    capacity:
    storage: 10Gi
    accessModes:
    - ReadWriteMany
    hostPath:
    path: "/mnt/data"
    kubectl apply -f task-pv-volume.yaml
    //Verify
    kubectl get pv
    vim task-pvc-volume.yaml
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
    name: task-pv-claim
    spec:
    storageClassName: manual
    accessModes:
    - ReadWriteMany
    resources:
    requests:
    storage: 3Gi
    kubectl apply -f task-pvc-volume.yaml
    //Verify
    Kuk kubectl get pvc

Answer: B


NEW QUESTION # 40
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 # 41
Create a nginx pod with label env=test in engineering namespace

Answer:

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 -n engineering -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 # 42
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
    - 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
  • 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
    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

Answer: B


NEW QUESTION # 43
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


NEW QUESTION # 44
Create and configure the service front-end-service so it's accessible through NodePort and routes to the existing pod named front-end.

Answer:

Explanation:
See the solution below.
Explanation
solution


NEW QUESTION # 45
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 # 46
Create a deployment as follows:
* Name: nginx-random
* Exposed via a service nginx-random
* Ensure that the service & pod are accessible via their respective DNS records
* The container(s) within any pod(s) running as a part of this deployment should use the nginx Image Next, use the utility nslookup to look up the DNS records of the service & pod and write the output to
/opt/KUNW00601/service.dns and /opt/KUNW00601/pod.dns respectively.

Answer:

Explanation:
See the solution below.
Explanation
Solution:



NEW QUESTION # 47
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 # 48
Create a persistent volume with name app-data, of capacity 2Gi and access mode ReadWriteMany. The type of volume is hostPath and its location is /srv/app-data.

Answer:

Explanation:
solution
Persistent Volume
A persistent volume is a piece of storage in a Kubernetes cluster. PersistentVolumes are a cluster-level resource like nodes, which don't belong to any namespace. It is provisioned by the administrator and has a particular file size. This way, a developer deploying their app on Kubernetes need not know the underlying infrastructure. When the developer needs a certain amount of persistent storage for their application, the system administrator configures the cluster so that they consume the PersistentVolume provisioned in an easy way.
Creating Persistent Volume
kind: PersistentVolume apiVersion: v1 metadata: name:app-data spec: capacity: # defines the capacity of PV we are creating storage: 2Gi #the amount of storage we are tying to claim accessModes: # defines the rights of the volume we are creating - ReadWriteMany hostPath: path: "/srv/app-data" # path to which we are creating the volume Challenge Create a Persistent Volume named app-data, with access mode ReadWriteMany, storage classname shared, 2Gi of storage capacity and the host path /srv/app-data.

2. Save the file and create the persistent volume.

3. View the persistent volume.

Our persistent volume status is available meaning it is available and it has not been mounted yet. This status will change when we mount the persistentVolume to a persistentVolumeClaim.
PersistentVolumeClaim
In a real ecosystem, a system admin will create the PersistentVolume then a developer will create a PersistentVolumeClaim which will be referenced in a pod. A PersistentVolumeClaim is created by specifying the minimum size and the access mode they require from the persistentVolume.
Challenge
Create a Persistent Volume Claim that requests the Persistent Volume we had created above. The claim should request 2Gi. Ensure that the Persistent Volume Claim has the same storageClassName as the persistentVolume you had previously created.
kind: PersistentVolume apiVersion: v1 metadata: name:app-data
spec:
accessModes: - ReadWriteMany resources:
requests: storage: 2Gi
storageClassName: shared
2. Save and create the pvc
njerry191@cloudshell:~ (extreme-clone-2654111)$ kubect1 create -f app-data.yaml persistentvolumeclaim/app-data created
3. View the pvc

4. Let's see what has changed in the pv we had initially created.

Our status has now changed from available to bound.
5. Create a new pod named myapp with image nginx that will be used to Mount the Persistent Volume Claim with the path /var/app/config.
Mounting a Claim
apiVersion: v1 kind: Pod metadata: creationTimestamp: null name: app-data spec: volumes: - name:congigpvc persistenVolumeClaim: claimName: app-data containers: - image: nginx name: app volumeMounts: - mountPath: "/srv/app-data " name: configpvc


NEW QUESTION # 49
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 # 50
Check the image version in pod without the describe command

Answer:

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


NEW QUESTION # 51
Create an nginx pod and list the pod with different levels of verbosity

  • A. // create a pod
    kubectl run nginx --image=nginx --restart=Never --port=80
    // List the pod with different verbosity
    kubectl get po nginx --v=7
    kubectl get po nginx --v=8
    kubectl get po nginx --v=9
  • B. // create a pod
    kubectl run nginx --image=nginx --restart=Never --port=80
    // List the pod with different verbosity
    kubectl get po nginx --v=7
    kubectl get po nginx --v=6
    kubectl get po nginx --v=9

Answer: A


NEW QUESTION # 52
......


Cloud Native Computing Foundation (CNCF) Training and Certification

Cloud Native Computing Foundation (CNCF) provides resources, as well as training and certification, to those who want to contribute or learn more about big data technologies. Operating Kubernetes cluster infrastructure is one of the major benefits of Cloud Native Computing. Provider neutral certification from Cloud Native Computing Foundation (CNCF) will offer a lot of opportunities for those who want to be part of the cloud-native revolution. Certifications from Cloud Native Computing Foundation (CNCF) will help the individual to get ahead of other fellow technologists. CNCF CKA exam dumps will be the best choice for any IT professionals who want to achieve a CNCF Certified Kubernetes Administrator certification. Assessment of knowledge of cloud native computing will provide the individual with more value added value. Extra opportunities will be available to individuals who prepare and pass the CNCF Certified Kubernetes Administrator (CKA) exam. Payment of the certification fee is required to take the CNCF Certified Kubernetes Administrator (CKA) exam. Card will be delivered via email to the address provided in the registration form immediately upon successful passing of the exam.

Exact exam details are subject to change. Certification exam details are subject to change. Passsure enables the customer to be reassured of passing the exam by checking exam scores online. Exact exam details are subject to change. Email notifications will be sent to the candidate upon the completion of each exam. Methods of payment accepted include Visa, MasterCard, and American Express. Days and times of certification exams are subject to change. Ready to schedule your exam within 30 days from the time of booking. If a candidate wants to schedule an exam for a date later than the 30-day window, he/she will have to contact Brightwork to negotiate a new date and time. Companies that use Brightwork as their cloud provider can benefit from Brightworks discount rates.

 

CKA exam dumps with real Linux Foundation questions and answers: https://www.testpassed.com/CKA-still-valid-exam.html

CKA Exam in First Attempt Guaranteed: https://drive.google.com/open?id=16uMwDiOiHUx85xTwH2ljqeN4PpIsovVX