CKA試験問題集合格できるには更新された2024年06月テスト問題集 [Q38-Q62]

Share

CKA試験問題集合格できるには更新された2024年06月テスト問題集

CKAテスト問題練習は2024年最新のに更新された68問あります

質問 # 38
Create and configure the service front-end-service so it's accessible through NodePort and routes to the existing pod named front-end.

正解:

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


質問 # 39
Create and configure the service front-end-service so it's accessible through NodePort and routes to the existing pod named front-end.

正解:

解説:
See the solution below.
Explanation
solution


質問 # 40
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).

正解:

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

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


質問 # 41
List the nginx pod with custom columns POD_NAME and POD_STATUS

正解:

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


質問 # 42
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

正解:

解説:
See the solution below.
Explanation
solution



質問 # 43
Create a pod as follows:
* Name: mongo
* Using Image: mongo
* In a new Kubernetes namespace named

正解:

解説:
See the solution below.
Explanation
solution


質問 # 44
Create a pod with environment variables as var1=value1.Check the environment variable in pod

  • A. kubectl run nginx --image=nginx --restart=Never --env=var1=value1
    # then
    kubectl exec -it nginx -- env
    # or
    kubectl describe po nginx | grep value1
  • B. 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

正解:B


質問 # 45
List all the pods sorted by created timestamp

正解:

解説:
kubect1 get pods--sort-by=.metadata.creationTimestamp


質問 # 46
An Administrator is configuring Authentication Enforcement and they would like to create an exemption rule to exempt a specific group from authentication. Which authentication enforcement object should they select?

  • A. default-web-form
  • B. default-browser-challenge
  • C. default-authentication-bypass
  • D. default-no-captive-port

正解:D


質問 # 47
Check to see how many worker nodes are ready (not including nodes tainted NoSchedule) and write the number to /opt/KUCC00104/kucc00104.txt.

正解:

解説:
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


質問 # 48
Score: 4%

Task
Scale the deployment presentation to 6 pods.

正解:

解説:
Solution:
kubectl get deployment
kubectl scale deployment.apps/presentation --replicas=6


質問 # 49
Create a nginx pod with label env=test in engineering namespace
See the solution below.

  • A. 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
  • B. 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

正解:A


質問 # 50
Create a nginx pod with label env=test in engineering namespace

正解:

解説:
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


質問 # 51
Check the history of deployment

正解:

解説:
kubectl rollout history deployment webapp


質問 # 52
Create a pod that having 3 containers in it? (Multi-Container)

正解:

解説:
image=nginx, image=redis, image=consul
Name nginx container as "nginx-container"
Name redis container as "redis-container"
Name consul container as "consul-container"
Create a pod manifest file for a container and append container
section for rest of the images
kubectl run multi-container --generator=run-pod/v1 --image=nginx --
dry-run -o yaml > multi-container.yaml
# then
vim multi-container.yaml
apiVersion: v1
kind: Pod
metadata:
labels:
run: multi-container
name: multi-container
spec:
containers:
- image: nginx
name: nginx-container
- image: redis
name: redis-container
- image: consul
name: consul-container
restartPolicy: Always


質問 # 53
Create a hostPath PersistentVolume named task-pv-volume with storage 10Gi, access modes ReadWriteOnce, storageClassName manual, and volume at /mnt/data and verify

  • A. vim task-pv-volume.yaml
    apiVersion: v1
    kind: PersistentVolume
    metadata:
    name: task-pv-volume
    labels:
    type: local
    spec:
    storageClassName: ""
    capacity:
    storage: 5Gi
    accessModes:
    - ReadWriteOnce
    hostPath:
    path: "/mnt/data"
    kubectl apply -f task-pv-volume.yaml
    //Verify
    kubectl get pv
    NAME CAPACITY ACCESS
    MODES RECLAIM POLICY STATUS CLAIM
    STORAGECLASS REASON AGE
    task-pv-volume 5Gi RWO
    Retain Available
    3s
  • B. vim task-pv-volume.yaml
    apiVersion: v1
    kind: PersistentVolume
    metadata:
    name: task-pv-volume
    labels:
    type: local
    spec:
    storageClassName: ""
    capacity:
    storage: 5Gi
    accessModes:
    - ReadWriteOnce
    hostPath:
    path: "/mnt/data"
    kubectl apply -f task-pv-volume.yaml
    //Verify
    kubectl get pv
    NAME CAPACITY ACCESS
    MODES RECLAIM POLICY STATUS CLAIM
    STORAGECLASS REASON AGE
    task-pv-volume 4Gi RWO
    Retain Available
    8s

正解:A


質問 # 54
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.

正解:

解説:
See the solution below.
Explanation
solution



質問 # 55
Annotate the pod with name=webapp

  • A. kubectl annotate pod nginx-dev-pod name=webapp
    kubectl annotate pod nginx-prod-pod name=webapp
    // Verify
    kubectl describe po nginx-dev-pod | grep -i annotations
  • B. kubectl annotate pod nginx-dev-pod name=webapp
    kubectl annotate pod nginx-prod-pod name=webapp
    // Verify
    kubectl describe po nginx-dev-pod | grep -i annotations
    kubectl describe po nginx-prod-pod | grep -i annotations

正解:B


質問 # 56
Create a pod with environment variables as var1=value1.Check the environment variable in pod

正解:

解説:
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


質問 # 57
List pod logs named "frontend" and search for the pattern "started" and write it to a file "/opt/error-logs"

正解:

解説:
See the solution below.
Explanation
Kubectl logs frontend | grep -i "started" > /opt/error-logs


質問 # 58
Delete the above pod and create again from the same yaml file
and verifies there is no "test-file.txt" in the path /data/redis
(Since non-persistent storage "emptyDir" is used).

正解:

解説:
kubectl delete pod test-redis kubectl create -f test-redis.yaml kubectl exec -it test-redis /bin/sh cat /data/redis/file.txt // file doesn't exist


質問 # 59
Get list of all the nodes with labels

正解:

解説:
kubectl get nodes --show-labels


質問 # 60
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

正解:A


質問 # 61
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.

正解:

解説:
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.


質問 # 62
......

正真正銘のCKA問題集には100%合格率練習テスト問題集:https://www.passtest.jp/Linux-Foundation/CKA-shiken.html

更新されたプレミアムCKA試験エンジンPDF:https://drive.google.com/open?id=1cO8kcSIbFFEKQQHtV0WcTtalroujpJMQ