100% Updated Linux Foundation CKA Enterprise PDF Dumps [Q23-Q40]

Share

100% Updated Linux Foundation CKA Enterprise PDF Dumps

Use Valid Exam CKA by VCEEngine Books For Free 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


Linux Foundation CKA Exam Syllabus Topics:

TopicDetails
Topic 1
  • Know how to use Ingress controllers and Ingress resources
  • Understand how to monitor applications
Topic 2
  • Provision underlying infrastructure to deploy a Kubernetes cluster
  • Manage container stdout & stderr logs
Topic 3
  • Understand how resource limits can affect Pod scheduling
  • Use ConfigMaps and Secrets to configure applications
Topic 4
  • Choose an appropriate container network interface plugin
  • Know how to configure applications with persistent storage
Topic 5
  • Awareness of manifest management and common templating tools
  • Understand storage classes, persistent volumes
Topic 6
  • Understand ClusterIP, NodePort, LoadBalancer service types and endpoints
  • Understand persistent volume claims primitive
Topic 7
  • Perform a version upgrade on a Kubernetes cluster using Kubeadm
  • Understand volume mode, access modes and reclaim policies for volumes
Topic 8
  • Know how to configure and use CoreDNS
  • Troubleshoot cluster component failure
  • Implement etcd backup and restore
Topic 9
  • Understand deployments and how to perform rolling update and rollbacks
  • Manage a highly-available Kubernetes cluster
Topic 10
  • Manage role based access control (RBAC)
  • Know how to scale applications
  • Understand the primitives used to create robust
Topic 11
  • Understand connectivity between Pods
  • Troubleshoot application failure
  • Use Kubeadm to install a basic cluster
Topic 12
  • Understand host networking configuration on the cluster nodes
  • Evaluate cluster and node logging

 

NEW QUESTION 23
List all persistent volumes sorted by capacity, saving the full kubectl output to
/opt/KUCC00102/volume_list. Use kubectl 's own functionality for sorting the output, and do not manipulate it any further.

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 24
List all the pods sorted by name

Answer:

Explanation:
See the solution below.
Explanation
kubectl get pods --sort-by=.metadata.name

 

NEW QUESTION 25
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 26
Get the number of schedulable nodes and write to a file
/opt/schedulable-nodes.txt

  • A. kubectl get nodes -o jsonpath="{range
    .items[*]}{.metadata.name}
    {.spec.taints[?(@.effect=='NoSchedule')].effect}{\"\n\"}{end}"
    | awk 'NF==11 {print $0}' > /opt/schedulable-nodes.txt
    // Verify
    cat /opt/schedulable-nodes.txt
  • B. kubectl get nodes -o jsonpath="{range
    .items[*]}{.metadata.name}
    {.spec.taints[?(@.effect=='NoSchedule')].effect}{\"\n\"}{end}"
    | awk 'NF==1 {print $0}' > /opt/schedulable-nodes.txt
    // Verify
    cat /opt/schedulable-nodes.txt

Answer: B

 

NEW QUESTION 27
List all the pods showing name and namespace with a json path expression

Answer:

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

 

NEW QUESTION 28
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:
See the solution below.
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: PersistentVolumeapiVersion: v1metadata: name: 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 " # path to which we are creating the volume Challenge Create a Persistent Volume named ReadWriteMany, storage classname shared, 2Gi of storage capacity and the host path

2. Save the file and create the persistent volume.
Image for post

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: PersistentVolumeapiVersion: v1metadata: name:
spec:
accessModes: - ReadWriteMany
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
Image for post

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

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: v1kind: Podmetadata: creationTimestamp: null name: app-dataspec: volumes: - name:congigpvc persistenVolumeClaim: claimName: app-data containers: - image: nginx name: app volumeMounts: - mountPath: "/srv/app-data " name: configpvc

 

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

 

NEW QUESTION 30
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.
You can ssh to the failed node using:
[student@node-1] $ | ssh Wk8s-node-0
You can assume elevated privileges on the node with the following command:
[student@w8ks-node-0] $ | sudo -i

Answer:

Explanation:
See the solution below.
Explanation
solution


 

NEW QUESTION 31
List "nginx-dev" and "nginx-prod" pod and delete those pods

Answer:

Explanation:
See the solution below.
Explanation
kubect1 get pods -o wide
kubectl delete po "nginx-dev"kubectl delete po "nginx-prod"

 

NEW QUESTION 32
Install a kubernetes cluster with one master and one worker using kubeadm

  • A. This is a straightforward question, you need to install kubernetes cluster using kubeadm with one master and one worker.
    Refer : https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/
  • B. This is a straightforward question, you need to install kubernetes cluster using kubeadm with one master and one worker.
    Installation is considered success once both master and worker
    nodes become available.
    Refer : https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/

Answer: B

 

NEW QUESTION 33
Scale the deployment to 5 replicas

Answer:

Explanation:
kubectl scale deployment webapp -replicas=5 //Verify kubectl get deploy kubectl get po,rs

 

NEW QUESTION 34
Create a deployment spec file thatwill:
* Launch 7 replicas of thenginxImage 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 thatyou produced during this task.

Answer:

Explanation:
See the solution below.
Explanation
solution

 

NEW QUESTION 35
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 36
Check the rollout history and make sure everything is ok after the update

  • A. kubectl rollout history deploy webapp
    kubectl get deploy webapp --show-labels
    kubectl get rs -l app=webapp
    kubectl get po -l app=webapp
  • B. kubectl rollout history deploy webapp
    kubectl get deploy webapp --show-labels
    kubectl get rs -
    kubectl get po -l app=webapp

Answer: A

 

NEW QUESTION 37
Get IP address of the pod - "nginx-dev"

Answer:

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

 

NEW QUESTION 38
List pod logs named "frontend" and search for the pattern "started" and write it to a file "/opt/error-logs"

Answer:

Explanation:
Kubectl logs frontend | grep -i "started" > /opt/error-logs

 

NEW QUESTION 39
List all the pods sorted by created timestamp

Answer:

Explanation:
kubect1 get pods--sort-by=.metadata.creationTimestamp

 

NEW QUESTION 40
......

Linux Foundation CKA Official Cert Guide PDF: https://www.vceengine.com/CKA-vce-test-engine.html

Free Kubernetes Administrator CKA Official Cert Guide PDF Download: https://drive.google.com/open?id=1GaB2MVoVbVnUFNZkdpS_j1bMd-Ttt5sJ