[Mar 02, 2023] Lesson Brilliant PDF for the CKA Tests Free Updated Today [Q12-Q37]

Share

[Mar 02, 2023] Lesson Brilliant PDF for the CKA Tests Free Updated Today

Get New 2023 Valid Practice Kubernetes Administrator CKA Q&A - Testing Engine


What are the various ways available for you to prepare for the CNCF CKA Certification Exam?

Exam will be provided to you by different providers. You can select what you want to pay for. Exams are available through the CNCF CKA Certification Exam. CNCF CKA Dumps will be important for students who want to take the exam. Cost will be available for all concerned. Passed with scores will be important for students who want to study. Dynamics is important for students who want to study. Best results will be available for the CNCF CKA Certification Exam. Update will be available for the CNCF CKA Certification Exam.

It will be important to make sure that you are choosing the best provider for your exam. CNCF CKA practice test is one of the most affordable certification sites online today. Node will be important for students who want to take the CNCF CKA Certification Exam.


Cloud Native Computing Foundation (CNCF) Exams

Cloud Native Computing Foundation (CNCF) Certification is a vendor-neutral qualification that provides validation of individuals knowledge of cloud native computing. Brightwork is the only authorized CNCF training provider for the CNCF Certified Kubernetes Administrator exam. CNCF CKA exam dumps has an excellent track record in passing the Cloud Native Computing exams, including this exam. The Cloud Native Computing Foundation (CNCF) has released its own official study guide to prepare for the certification exam. Assure the candidate is familiar with the content of this official study guide. Rewarding incentives will be provided for those who pass the certification exam.

 

NEW QUESTION 12
Perform the following tasks:
* Add an init container to hungry-bear (which has been defined in spec file
/opt/KUCC00108/pod-spec-KUCC00108.yaml)
* The init container should create an empty file named/workdir/calm.txt
* If /workdir/calm.txt is not detected, the pod should exit

Answer:

Explanation:
* Once the spec file has been updated with the init container definition, the pod should be created See the solution below.
Explanation
solution


 

NEW QUESTION 13
Configure the kubelet systemd- managed service, on the node labelled with name=wk8s-node-1, to launch a pod containing a single container of Image httpd named webtool automatically. Any spec files required should be placed in the /etc/kubernetes/manifests directory on the node.
You can ssh to the appropriate node using:
[student@node-1] $ ssh wk8s-node-1
You can assume elevated privileges on the node with the following command:
[student@wk8s-node-1] $ | sudo -i

Answer:

Explanation:
solution




 

NEW QUESTION 14
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 15
Create a deployment spec file that will:
Launch 7 replicas of the nginx Image with the label app_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:
solution

 

NEW QUESTION 16
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. PBP (Protocol Based Protection)
  • B. PBP (Packet Buffer Protection)
  • C. BGP (Border Gateway Protocol)
  • D. PGP (Packet Gateway Protocol)

Answer: A

 

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
Monitor the logs of pod foo and:
Extract log lines corresponding
unable-to-access-website
Write them to/opt/KULM00201/foo

Answer:

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

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

 

NEW QUESTION 19
Create a deployment named "myapp" that having 2 replicas with
nginx image and expose deployment as service named "myservice"

  • A. // Create a YAML Template
    kubectl create deploy myapp --image=nginx --dry-run -o yaml >
    myapp.yaml
    //Update replicas=2 in myapp.yaml file
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
    app: myapp
    name: myapp
    spec:
    replicas: 2
    selector:
    matchLabels:
    app: myapp
    template:
    metadata:
    labels:
    app: myapp
    spec:
    containers:
    - image: nginx
    name: nginx
    // Create deployment
    kubectl create -f myapp.yaml
    // Creating YAML template for service
    kubectl expose deployment myapp --type=ClusterIP --port=60 --
    target-port=60 --name=myservice --dry-run -o yaml >
    myservice.yaml
    YAML File:
    apiVersion: v1
    kind: Service
    metadata:
    labels:
    app: myapp
    name: myservice
    spec:
    ports:
    - port: 60
    protocol: TCP
    targetPort: 80
    selector:
    app: myapp
    type: ClusterIP
    kubectl get svc
    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
    AGE
    kubernetes ClusterIP 10.2.0.1 <none> 443/TCP
    158d
    myservice ClusterIP 10.2.96.175 <none> 80/TCP
    40s
  • B. // Create a YAML Template
    kubectl create deploy myapp --image=nginx --dry-run -o yaml >
    myapp.yaml
    //Update replicas=2 in myapp.yaml file
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    labels:
    app: myapp
    name: myapp
    spec:
    replicas: 2
    selector:
    matchLabels:
    app: myapp
    template:
    metadata:
    labels:
    app: myapp
    spec:
    containers:
    - image: nginx
    name: nginx
    // Create deployment
    kubectl create -f myapp.yaml
    // Creating YAML template for service
    kubectl expose deployment myapp --type=ClusterIP --port=80 --
    target-port=80 --name=myservice --dry-run -o yaml >
    myservice.yaml
    YAML File:
    apiVersion: v1
    kind: Service
    metadata:
    labels:
    app: myapp
    name: myservice
    spec:
    ports:
    - port: 80
    protocol: TCP
    targetPort: 80
    selector:
    app: myapp
    type: ClusterIP
    kubectl get svc
    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
    AGE
    kubernetes ClusterIP 10.2.0.1 <none> 443/TCP
    158d
    myservice ClusterIP 10.2.96.175 <none> 80/TCP
    40s

Answer: B

 

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

 

NEW QUESTION 21
Score: 7%

Task
Create a new NetworkPolicy named allow-port-from-namespace in the existing namespace echo. Ensure that the new NetworkPolicy allows Pods in namespace my-app to connect to port 9000 of Pods in namespace echo.
Further ensure that the new NetworkPolicy:
* does not allow access to Pods, which don't listen on port 9000
* does not allow access from Pods, which are not in namespace my-app

Answer:

Explanation:
See the solution below.
Explanation
Solution:
#network.yaml
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-port-from-namespace
namespace: internal
spec:
podSelector:
matchLabels: {
}
policyTypes:
- Ingress
ingress:
- from:
- podSelector: {
}
ports:
- protocol: TCP
port: 8080
#spec.podSelector namespace pod
kubectl create -f network.yaml

 

NEW QUESTION 22
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 23
Get IP address of the pod - "nginx-dev"

  • A. Kubect1 get po -o wide
    Using JsonPath
    kubect1 get pods
    .items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'
  • B. Kubect1 get po -o wide
    Using JsonPath
    kubect1 get pods -o=jsonpath='{range
    .items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'

Answer: B

 

NEW QUESTION 24
Create a pod with image nginx called nginx and allow traffic on port 80

Answer:

Explanation:
See the solution below.
Explanation
kubectlrun nginx --image=nginx --restart=Never --port=80

 

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

Task
Check to see how many nodes are ready (not including nodes tainted NoSchedule ) and write the number to /opt/KUSC00402/kusc00402.txt.

Answer:

Explanation:
Solution:
kubectl describe nodes | grep ready|wc -l
kubectl describe nodes | grep -i taint | grep -i noschedule |wc -l
echo 3 > /opt/KUSC00402/kusc00402.txt
#
kubectl get node | grep -i ready |wc -l
# taints、noSchedule
kubectl describe nodes | grep -i taints | grep -i noschedule |wc -l
#
echo 2 > /opt/KUSC00402/kusc00402.txt

 

NEW QUESTION 27
Deploy a pod with image=redis on a node with label disktype=ssd

  • A. // Get list of nodes
    kubectl get nodes
    //Get node with the label disktype=ssd
    kubectl get no -l disktype=ssd
    // Create a sample yaml file
    kubectl run node-redis --generator=run-pod/v1 --image=redis --dry
    run -o yaml > test-redis.yaml
    // Edit test-redis.yaml file and add nodeSelector
    vim test-redis.yaml
    apiVersion: v1
    - name: node-redis
    image: redis
    imagePullPolicy: IfNotPresent
    kubectl apply -f test-redis.yaml
    / // Verify
    K kubectl get po -o wide
  • B. // Get list of nodes
    kubectl get nodes
    //Get node with the label disktype=ssd
    kubectl get no -l disktype=ssd
    // Create a sample yaml file
    kubectl run node-redis --generator=run-pod/v1 --image=redis --dry
    run -o yaml > test-redis.yaml
    // Edit test-redis.yaml file and add nodeSelector
    vim test-redis.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: redis
    spec:
    nodeSelector:
    disktype: ssd
    containers:
    - name: node-redis
    image: redis
    imagePullPolicy: IfNotPresent
    kubectl apply -f test-redis.yaml
    / // Verify
    K kubectl get po -o wide

Answer: B

 

NEW QUESTION 28
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 29
Score: 5%

Task
Monitor the logs of pod bar and:
* Extract log lines corresponding to error file-not-found
* Write them to /opt/KUTR00101/bar

Answer:

Explanation:
Solution:
kubectl logs bar | grep 'unable-to-access-website' > /opt/KUTR00101/bar cat /opt/KUTR00101/bar

 

NEW QUESTION 30
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 31
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 32
Create a redis pod, and have it use a non-persistent storage
(volume that lasts for the lifetime of the Pod)

  • A. vim redis-pod-vol.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: redis
    spec:
    containers:
    - name: redis
    image: redis
    ports:
    - containerPort: 6679
    volumeMounts:
    - mountPath: /data
    name: redis-storage
    volumes:
    - name: redis-storage
    emptyDir: {}
    kubectl apply -f redis-pod-vol.yaml
  • B. vim redis-pod-vol.yaml
    apiVersion: v1
    kind: Pod
    metadata:
    name: redis
    spec:
    containers:
    - name: redis
    image: redis
    ports:
    - containerPort: 6379
    volumeMounts:
    - mountPath: /data
    name: redis-storage
    volumes:
    - name: redis-storage
    emptyDir: {}
    kubectl apply -f redis-pod-vol.yaml

Answer: B

 

NEW QUESTION 33
Add a taint to node "worker-2" with effect as "NoSchedule" and
list the node with taint effect as "NoSchedule"

  • A. // Add taint to node "worker-2"
    kubectl taint nodes worker-2 key=value:NoSchedule
    // Verify
    // Using "custom-coloumns" , you can customize which coloumn to
    be printed
    kubectl get nodes -o customcolumns=NAME:.metadata.name,TAINTS:.spec.taints --no-headers
    // Using jsonpath
    kubectl get nodes -o jsonpath="{range
    .items[*]}{.metadata.name} {.spec.taints[?(
    @.effect=='NoSchedule' )].effect}{\"\n\"}{end}" | awk 'NF==2
    {print $0}'
  • B. // Add taint to node "worker-2"
    kubectl taint nodes worker-2 key=value:NoSchedule
    .items[*]}{.metadata.name} {.spec.taints[?(
    @.effect=='NoSchedule' )].effect}{\"\n\"}{end}" | awk 'NF==2
    {print $0}'

Answer: A

 

NEW QUESTION 34
For this item, you will have to ssh and complete all tasks on these
nodes. Ensure that you return to the base node (hostname: ) when you have completed this item.
Context
As an administrator of a small development team, you have been asked to set up a Kubernetes cluster to test the viability of a new application.
Task
You must use kubeadm to perform this task. Any kubeadm invocations will require the use of the
--ignore-preflight-errors=all option.
Configure the node ik8s-master-O as a master node. .
Join the node ik8s-node-o to the cluster.

Answer:

Explanation:
See the solution below.
Explanation
solution
You must use the kubeadm configuration file located at /etc/kubeadm.conf when initializingyour cluster.
You may use any CNI plugin to complete this task, but if you don't have your favourite CNI plugin's manifest URL at hand, Calico is one popular option:
https://docs.projectcalico.org/v3.14/manifests/calico.yaml
Docker is already installed on both nodes and apt has been configured so that you can install the required tools.

 

NEW QUESTION 35
Create a file called "config.txt" with two values key1=value1
and key2=value2. Then create a configmap named "keyvalcfgmap" andread data from the file "config.txt" and verify that configmap is created correctly

  • A. cat >> config.txt << EOF
    key1=value1
    key2=value2
    EOF
    cat config.txt
    // Create configmap from "config.txt" file
    kubectl create cm keyvalcfgmap --from-file=config.txt
    //Verify
    kubectl get cm keyvalcfgmap -o yaml
  • B. cat >> config.txt << EOF
    key1=value1
    key2=value2
    EOF
    kubectl create cm keyvalcfgmap --from-file=config.txt
    //Verify
    kubectl get cm keyvalcfgmap -o yaml

Answer: A

 

NEW QUESTION 36
Create a secret mysecret with values user=myuser and password=mypassword

  • A. kubectl create secret generic my-secret --fromliteral=username=user --from-literal=password=mypassword
    // Verify
    kubectl get secret generic my-secret -o yaml
  • B. kubectl create secret generic my-secret --fromliteral=username=user --from-literal=password=mypassword
    // Verify
    kubectl get secret --all-namespaces
    kubectl get secret generic my-secret -o yaml

Answer: B

 

NEW QUESTION 37
......

CKA Dumps PDF - 100% Passing Guarantee: https://www.easy4engine.com/CKA-test-engine.html

Latest CKA PDF Dumps & Real Tests Free Updated Today: https://drive.google.com/open?id=18CbgkrWbUdJQqIEUTX-eATHlOCKWAhKc