[Q29-Q54] Attested CKA Dumps PDF Resource [2021]

Share

Attested CKA Dumps PDF Resource [2021]

Latest CKA Actual Free Exam Questions Updated 63 Questions

NEW QUESTION 29
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 30
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 31
Create a busybox pod and add "sleep 3600" command

Answer:

Explanation:
kubectl run busybox --image=busybox --restart=Never -- /bin/sh -c "sleep 3600"

 

NEW QUESTION 32
Update the deployment with the image version 1.17.4 and verify

  • A. kubectl set image deploy/webapp nginx=nginx:1.17.4
    //Verify
    kubectl describe deploy webapp | grep Image
    kubectl get deploy -o=jsonpath='{range.items [*]}{.[*]}
    {.metadata.name}{"\t"}{.spec.template.spec.containers[*].i
    mage}{"\n"}'
  • B. kubectl set image deploy/webapp nginx=nginx:1.17.4
    //Verify
    kubectl describe deploy webapp | grep Image
    kubectl get deploy -
    {.metadata.name}{"\t"}{.spec.template.spec.containers[*].i
    mage}{"\n"}'

Answer: A

 

NEW QUESTION 33
Create the service as type NodePort with the port 32767 for the nginx pod with the pod selector app: my-nginx

Answer:

Explanation:
kubectl run nginx --image=nginx --restart=Never -- labels=app=nginx --port=80 --dry-run -o yaml > nginx-pod.yaml

 

NEW QUESTION 34
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:app-dataspec: 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 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 35
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 36
Check to see how many worker nodes are ready (not including nodes tainted NoSchedule) and write the number to /opt/KUCC00104/kucc00104.txt.

Answer:

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

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

 

NEW QUESTION 37
Score: 4%

Task
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:
kubectl run kucc8 --image=nginx --dry-run -o yaml > kucc8.yaml
# vi kucc8.yaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
name: kucc8
spec:
containers:
- image: nginx
name: nginx
- image: redis
name: redis
- image: memcached
name: memcached
- image: consul
name: consul
#
kubectl create -f kucc8.yaml
#12.07

 

NEW QUESTION 38
Check logs of each container that "busyboxpod-{1,2,3}"

  • A. kubectl logs busybox -c busybox-container-1
    kubectl logs busybox -c busybox-container-2
    kubectl logs busybox -c busybox-container-3
  • B. kubectl logs busybox -c busybox-container-1
    kubectl logs busybox -c busybox-container-3
    kubectl logs busybox -c busybox-container-3

Answer: A

 

NEW QUESTION 39
Create an nginx pod which loads the secret as environment variables

  • A. // create a yml file
    kubectl run nginx --image=nginx --restart=Never --dry-run -o
    yaml > nginx.yml
    // add env section below and create
    vim nginx.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    envFrom:
    - secretRef:
    name: my-secret
    restartPolicy: Never
    kubectl apply -f nginx.yaml
    //verify
    kubectl exec -it nginx - env
  • B. // create a yml file
    kubectl run nginx --image=nginx --restart=Never --dry-run -o
    yaml > nginx.yml
    // add env section below and create
    vim nginx.yaml
    run: nginx
    name: nginx
    spec:
    containers:
    - image: nginx
    name: nginx
    envFrom:
    - secretRef:
    name: my-secret
    restartPolicy: Never
    kubectl apply -f nginx.yaml
    //verify
    kubectl exec -it nginx - env

Answer: A

 

NEW QUESTION 40
Resume the rollout of the deployment

Answer:

Explanation:
kubectl rollout resume deploy webapp

 

NEW QUESTION 41
Scale the deployment to 5 replicas

Answer:

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

 

NEW QUESTION 42
Which one is the correct configuration?

  • A. @Panorama
  • B. #Panorama
  • C. $Panorama
  • D. &Panorama

Answer: C

 

NEW QUESTION 43
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 44
Create a Pod with main container busybox and which executes this
"while true; do echo 'Hi I am from Main container' >>
/var/log/index.html; sleep 5; done" and with sidecar container
with nginx image which exposes on port 80. Use emptyDir Volume
and mount this volume on path /var/log for busybox and on path
/usr/share/nginx/html for nginx container. Verify both containers
are running.

  • A. // create an initial yaml file with this
    kubectl run multi-cont-pod --image=busbox --restart=Never --
    dry-run -o yaml > multi-container.yaml
    // edit the yml as below and create it
    kubectl create -f multi-container.yaml
    vim multi-container.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: multi-cont-pod
    name: multi-cont-pod
    spec:
    volumes:
    - name: var-logs
    emptyDir: {}
    containers:
    - image: busybox
    command: ["/bin/sh"]
    args: ["-c", "while true; do echo 'Hi I am from Main
    container' >> /var/log/index.html; sleep 5;done"]
    name: main-container
    volumeMounts:
    - name: var-logs
    mountPath: /var/log
    - image: nginx
    name: sidecar-container
    ports:
    - containerPort: 80
    volumeMounts:
    - name: var-logs
    mountPath: /usr/share/nginx/html
    restartPolicy: Never
    // Create Pod
    kubectl apply -f multi-container.yaml
    //Verify
    kubectl get pods
  • B. // create an initial yaml file with this
    kubectl run multi-cont-pod --image=busbox --restart=Never --
    dry-run -o yaml > multi-container.yaml
    // edit the yml as below and create it
    kubectl create -f multi-container.yaml
    vim multi-container.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    labels:
    run: multi-cont-pod
    name: multi-cont-pod
    spec:
    volumes:
    - image: busybox
    command: ["/bin/sh"]
    args: ["-c", "while true; do echo 'Hi I am from Main
    container' >> /var/log/index.html; sleep 5;done"]
    name: main-container
    volumeMounts:
    - name: var-logs
    mountPath: /var/log
    - image: nginx
    name: sidecar-container
    ports:
    mountPath: /usr/share/nginx/html
    restartPolicy: Never
    // Create Pod
    kubectl apply -f multi-container.yaml
    //Verify
    kubectl get pods

Answer: A

 

NEW QUESTION 45
List the nginx pod with custom columns POD_NAME and POD_STATUS

Answer:

Explanation:
kubectl get po -o=custom-columns="POD_NAME:.metadata.name, POD_STATUS:.status.containerStatuses[].state"

 

NEW QUESTION 46
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 47
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 48
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 49
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 50
To protect your firewall and network from single source denial of service (DoS) attacks that can overwhelm its packet buffer and cause legitimate traffic to drop, you can configure:

  • A. PGP (Packet Gateway Protocol)
  • B. PBP (Packet Buffer Protection)
  • C. PBP (Protocol Based Protection)
  • D. BGP (Border Gateway Protocol)

Answer: C

 

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

 

NEW QUESTION 52
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 53
Score: 5%

Task
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/KUTR00401/KUTR00401.txt (which already exists).

Answer:

Explanation:
See the solution below.
Explanation
Solution:
kubectl top -l name=cpu-user -A
echo 'pod name' >> /opt/KUT00401/KUT00401.txt

 

NEW QUESTION 54
......


Average Salary of Linux Foundation-CKA: Certified Kubernetes Administrator Exam Certified Professionals

The average salary of a AI-900: Microsoft Azure AI Fundamentals Exam Outlook and Modules Exam Certified Expert in:

  • United State - 145,112 USD
  • India - 11,74,223 INR
  • Europe - 105,1100 EURO
  • England - 84,784 POUND

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

 

CKA Certification Overview Latest CKA PDF Dumps: https://www.prep4sures.top/CKA-exam-dumps-torrent.html

Free CKA Exam Braindumps certification guide Q&A: https://drive.google.com/open?id=1uQ8ZsxlsOJhwvuWSmn3i6XCGGhEMjsiT