Exam Questions Answers Braindumps CKA Exam Dumps PDF Questions [Q17-Q42]

Share

Exam Questions Answers Braindumps CKA Exam Dumps PDF Questions

Download Free Linux Foundation CKA Real Exam Questions

NEW QUESTION 17
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 18
List all the pods that are serviced by the service "webservice" and copy the output in /opt/$USER/webservice.targets Note: You need to list the endpoints

Answer:

Explanation:
kubectl descrive svc webservice | grep -i "Endpoints" > /opt/$USER/webservice.targets kubectl get endpoints webservice > /opt/$USER/webservice.targets

 

NEW QUESTION 19
Create an nginx pod with containerPort 80 and it should check the pod running at endpoint / healthz on port 80 and verify and delete the pod.

  • A. kubectl run nginx --image=nginx --restart=Always --port=80 --
    dry-run -o yaml > nginx-pod.yaml
    // add the livenessProbe section and create
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    ports:
    - containerPort: 80
    livenessProbe:
    httpGet:
    path: /healthz
    port: 80
    restartPolicy: Always
    kubectl create -f nginx-pod.yaml
    // verify
    kubectl describe pod nginx | grep -i readiness
    kubectl delete po nginx
  • B. kubectl run nginx --image=nginx --restart=Always --port=80 --
    dry-run -o yaml > nginx-pod.yaml
    // add the livenessProbe section and create
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    containers:
    - image: nginx
    name: nginx
    ports:
    - containerPort: 60
    livenessProbe:
    httpGet:
    path: /healthz
    port: 60
    restartPolicy: Always
    kubectl create -f nginx-pod.yaml
    // verify
    kubectl describe pod nginx | grep -i readiness
    kubectl delete po nginx

Answer: A

 

NEW QUESTION 20
A Kubernetes worker node, named .Investigate why this is the case,
andperform any appropriate steps tobring the node to a state,ensuring that any changes are madepermanent.
You cansshto the failednode using:
[student@node-1] $ | sshWk8s-node-0
You can assume elevatedprivileges on the node with thefollowing command:
[student@w8ks-node-0] $ |sudo -i

Answer:

Explanation:
See the solution below.
Explanation
solution


 

NEW QUESTION 21
What file type upload is supported as part of the basic WildFire service?

  • A. ELF
  • B. BAT
  • C. PE
  • D. VBS

Answer: C

 

NEW QUESTION 22
Create a configmap called cfgvolume with values var1=val1,
var2=val2 and create an nginx pod with volume nginx-volume which
reads data from this configmap cfgvolume and put it on the path
/etc/cfg

  • A. // first create a configmap cfgvolume
    kubectl create cm cfgvolume --from-literal=var1=val1 --fromliteral=var2=val2
    // verify the configmap
    kubectl describe cm cfgvolume
    // create the config map
    kubectl create -f nginx-volume.yml
    vim nginx-configmap-pod.yaml
    apiVersion: v1
    kind: Pod
    - name: nginx-volume
    configMap:
    name: cfgvolume
    containers:
    - image: nginx
    name: nginx
    volumeMounts:
    - name: nginx-volume
    mountPath: /etc/cfg
    restartPolicy: Always
    k kubectl apply -f nginx-configmap-pod.yaml
    / // Verify
    // exec into the pod
    kubectl exec -it nginx -- /bin/sh
    // check the path
    cd /etc/cfg
  • B. // first create a configmap cfgvolume
    kubectl create cm cfgvolume --from-literal=var1=val1 --fromliteral=var2=val2
    // verify the configmap
    kubectl describe cm cfgvolume
    // create the config map
    kubectl create -f nginx-volume.yml
    vim nginx-configmap-pod.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: nginx
    name: nginx
    spec:
    volumes:
    - name: nginx-volume
    configMap:
    name: cfgvolume
    containers:
    - image: nginx
    name: nginx
    volumeMounts:
    - name: nginx-volume
    mountPath: /etc/cfg
    restartPolicy: Always
    k kubectl apply -f nginx-configmap-pod.yaml
    / // Verify
    // exec into the pod
    kubectl exec -it nginx -- /bin/sh
    // check the path
    cd /etc/cfg

Answer: B

 

NEW QUESTION 23
Create a NetworkPolicy which denies all ingress traffic

  • A. apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
    name: default-deny
    spec:
    podSelector: ()
    policyTypes:
    - Ingress
  • B. apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
    name: default-deny
    spec:
    podSelector: {}
    policyTypes:
    - Ingress

Answer: B

 

NEW QUESTION 24
Create a redis pod named "test-redis" and exec into that pod and create a file named "test-file.txt" with the text 'This is called the test file' in the path /data/redis and open another tab and exec again with the same pod and verifies file exist in the same path.

  • A. vim test-redis.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: test-redis
    spec:
    containers:
    - name: redis
    image: redis
    ports:
    - containerPort: 6379
    volumeMounts:
    - mountPath: /data/redis
    name: redis-storage
    volumes:
    kubectl exec -it test-redis /bin/sh
    cd /data/redis
    echo 'This is called the test file' > file.txt
    //open another tab
    kubectl exec -it test-redis /bin/sh
    cat /data/redis/file.txt
  • B. vim test-redis.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: test-redis
    spec:
    containers:
    - name: redis
    image: redis
    ports:
    - containerPort: 6379
    volumeMounts:
    - mountPath: /data/redis
    name: redis-storage
    volumes:
    - name: redis-storage
    emptyDir: {}
    kubectl apply -f redis-pod-vol.yaml
    // first terminal
    kubectl exec -it test-redis /bin/sh
    cd /data/redis
    echo 'This is called the test file' > file.txt
    //open another tab
    kubectl exec -it test-redis /bin/sh
    cat /data/redis/file.txt

Answer: B

 

NEW QUESTION 25
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 26
Score: 4%

Task
Scale the deployment presentation

Answer:

Explanation:
See the solution below.
Explanation
Solution:
kubectl get deployment
kubectl scale deployment.apps/presentation --replicas=6

 

NEW QUESTION 27
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 28
Get list of persistent volumes and persistent volume claim in the cluster

Answer:

Explanation:
kubectl get pv kubectl get pvc

 

NEW QUESTION 29
What is the maximum number of samples that can be submitted to WildFire manually per day?

  • A. 5,000
  • B. 15,000
  • C. 1,000
  • D. 2,000

Answer: C

 

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

  • A. kubect1 get pods -o wide
    kubectl delete po "nginx-dev" kubectl delete po "nginx-prod"
  • B. kubect1 get pods -o wide
    kubectl delete po "nginx-dev" kubectl delete po "nginx-prod"

Answer: B

 

NEW QUESTION 31
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 32
Watch the job that runs 10 times one by one and verify 10 pods are created and delete those after it's completed

Answer:

Explanation:
kubectl get job -w kubectl get po kubectl delete job hello-job

 

NEW QUESTION 33
Configure the kubelet systemd-managed service, on the nodelabelled withname=wk8s-node-1, tolaunch a pod containing a singlecontainer of Image automatically. Any spec filesrequired should be placed in the/etc/kubernetes/manifests You canssh to theappropriate node using:
[student@node-1] $ sshwk8s-node-1
You can assume elevatedprivileges on the node with thefollowing command:
[student@wk8s-node-1] $ |sudo -i

Answer:

Explanation:
See the solution below.
Explanation
solution




 

NEW QUESTION 34
Check the history of deployment

Answer:

Explanation:
kubectl rollout history deployment webapp

 

NEW QUESTION 35
Create an nginx pod and set an env value as 'var1=val1'. Check the env value existence within the pod

  • A. kubectl run nginx --image=nginx --restart=Never --env=var1=val1
    # then
    kubectl exec -it nginx -- env
    # or
    kubectl exec -it nginx -- sh -c 'echo $var1'
    # or
    kubectl describe po nginx | grep val1
    # or
    kubectl run nginx --restart=Never --image=nginx --env=var1=val1
    -it --rm - env
  • B. kubectl run nginx --image=nginx --restart=Never --env=var1=val1
    # then
    kubectl exec -it nginx -- env
    # or
    kubectl run nginx --restart=Never --image=nginx --env=var1=val1
    -it --rm -- env

Answer: A

 

NEW QUESTION 36
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 37
Score: 4%

Context
You have been asked to create a new ClusterRole for a deployment pipeline and bind it to a specific ServiceAccount scoped to a specific namespace.
Task
Create a new ClusterRole named deployment-clusterrole, which only allows to create the following resource types:
* Deployment
* StatefulSet
* DaemonSet
Create a new ServiceAccount named cicd-token in the existing namespace app-team1.
Bind the new ClusterRole deployment-clusterrole lo the new ServiceAccount cicd-token , limited to the namespace app-team1.

Answer:

Explanation:
See the solution below.
Explanation
Solution:
Task should be complete on node -1 master, 2 worker for this connect use command
[student@node-1] > ssh k8s
kubectl create clusterrole deployment-clusterrole --verb=create
--resource=deployments,statefulsets,daemonsets
kubectl create serviceaccount cicd-token --namespace=app-team1
kubectl create rolebinding deployment-clusterrole --clusterrole=deployment-clusterrole
--serviceaccount=default:cicd-token --namespace=app-team1

 

NEW QUESTION 38
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.
Create a second pod named pod-secrets-via-env, using the redis Image, which exports password as CONFIDENTIAL

Answer:

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

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

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

 

NEW QUESTION 39
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 thestagingnamespace and the volumemust notbe persistent.

Answer:

Explanation:
See the solution below.
Explanation
solution


 

NEW QUESTION 40
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:
    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
  • 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:
    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: A

 

NEW QUESTION 41
How can an administrator configure the NGFW to automatically quarantine a device using Global Protect?

  • A. There is no native auto-quarantine feature so a custom script would need to be leveraged.
  • B. by adding the device's Host ID to a quarantine list and configure GlobalProtect to prevent users from connecting to the GlobalProtect gateway from a quarantined device.
  • C. by using security policies, log forwarding profiles, and log settings.
  • D. by exporting the list of quarantined devices to a pdf or csv file by selecting PDF/CSV at the bottom of the Device Quarantine page and leveraging the appropriate XSOAR playbook.

Answer: B

 

NEW QUESTION 42
......


Linux Foundation CKA Exam Syllabus Topics:

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


How to Prepare For Linux Foundation-CKA: Certified Kubernetes Administrator Exam

Preparation Guide for Linux Foundation-CKA: Certified Kubernetes Administrator Exam

Introduction

This certification is for Kubernetes administrators, cloud administrators and other IT professionals who manage Kubernetes instances. A certified K8s administrator has demonstrated the ability to do basic installation as well as configuring and managing production-grade Kubernetes clusters. They will have an understanding of key concepts such as Kubernetes networking, storage, security, maintenance, logging and monitoring, application lifecycle, troubleshooting, API object primitives and the ability to establish basic use-cases for end users. This learning path is intended specifically for Kubernetes cluster administrators. Anyone interested in learning how to work with Kubernetes will also benefit from this CNCF CKA practice exams and CNCF CKA practice test.

Responsibilities of a Kubernetes administrator involve designing and implementing solutions to leverage a Kubernetes cluster, configuring hardware, peripherals, and services, managing settings and storage, deploying cloud-native applications, and monitoring and supporting a Kubernetes environment. You also undertake duties like researching opportunities for automation, troubleshooting issues as reported by users, and mentoring junior team members in best practices. You often collaborate with other members of the IT team using tools like GIT to promote security, efficiency, and scalability of core services and capabilities.

Kubernetes is one of the world’s most popular container orchestration tools. Established by the Cloud Native Computing Foundation (CNCF), the Kubernetes Administrator certification is designed to validate your skills for working with Kubernetes. This learning path is designed to help you prepare you for the CKA exam. It includes a combination of courses covering each exam domain, a series of labs to build hands-on Kubernetes experience working directly in a live cloud environment, and exams to test your knowledge along the way.

A Kubernetes Adminstrator requires strong experience with Windows, Linux, or Unix system administration, as well as solid skills with orchestration platforms, such as ECS, Kubernetes, or Mesos. Knowledge of SQL databases and basic coding skills in Java, JavaScript, PHP, or a similar language are all desirable, as is experience with microservices architectures. Many positions require a bachelor’s degree in computer science, networking, or a related field. This exam to become a Certified Kubernetes Administrator (CKA) will enhance your qualifications and expand your income potential.

 

Latest Linux Foundation CKA Real Exam Dumps PDF: https://www.exam4tests.com/CKA-valid-braindumps.html

CKA Exam Dumps, CKA Practice Test Questions: https://drive.google.com/open?id=1R8PchQgevE0LyFtzwlC_FymdPVJwO6qU