リアルなCKA最新試験は2024年最新のCKA練習テスト問題集を提供しています [Q30-Q47]

Share

リアルなCKA最新試験Fast2test 2024年最新ののCKA練習テスト問題集を提供しています

全問CKA問題集でandCertified Kubernetes Administrator (CKA) Program Examトレーニングコース受験生を学習してパスさせるCertified Kubernetes Administrator (CKA) Program Exam試験無料問題集!


CKA認定試験は、Kubernetesクラスターで実際のタスクを実行する個人の能力をテストする、実践的なパフォーマンスベースの評価です。この試験は、Kubernetes管理における個人の知識とスキルを評価するために設計されたパフォーマンスベースのタスクのセットで構成されています。試験はライブ環境で実施され、候補者は、ノードの構成、ポッドの管理、ネットワークの問題のトラブルシューティングなどのタスクを実行する能力を実証する必要があります。この試験は、Kubernetesクラスターで効率的かつ効果的に作業する個人の能力をテストするように設計されています。


Linux Foundation Certified Kubernetes Administrator(CKA)プログラムは、Kubernetesと協力する専門家のスキルと知識を検証する認定試験です。 Kubernetesは、コンテナ化されたアプリケーションの展開、スケーリング、および管理を自動化するオープンソースコンテナオーケストレーションプラットフォームです。 CKAプログラムは、Kubernetesクラスターをインストール、構成、および管理する個人が能力をテストするように設計されています。

 

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

正解:

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


質問 # 31
List "nginx-dev" and "nginx-prod" pod and delete those pods

正解:

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


質問 # 32
Undo the deployment with the previous version and verify
everything is Ok

正解:

解説:
kubectl rollout undo deploy webapp kubectl rollout status deploy webapp kubectl get pods


質問 # 33
Schedule a pod as follows:
Name: nginx-kusc00101
Image: nginx
Node selector: disk=ssd

正解:

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

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

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


質問 # 34
Get the list of pods of webapp deployment

  • A. // Get the label of the deployment
    kubectl get deploy --show-labels
    kubectl get pods -l app=webapp
  • B. // Get the label of the deployment
    kubectl get deploy --show-labels
    // Get the pods with that label
    kubectl get pods -l app=webapp

正解:B


質問 # 35
Scale the deployment to 5 replicas

正解:

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


質問 # 36
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"}'

正解:A


質問 # 37
Perform the following tasks:
Add an init container to hungry-bear defined in spec file
/opt/KUCC00108/pod-spec-KUC
The init container should create /workdir/calm.txt
If /workdir/calm.txt is not
Once the spec file has been definition, the pod should be created

正解:

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

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

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


質問 # 38
Score: 7%

Task
Reconfigure the existing deployment front-end and add a port specification named http exposing port 80/tcp of the existing container nginx.
Create a new service named front-end-svc exposing the container port http.
Configure the new service to also expose the individual Pods via a NodePort on the nodes on which they are scheduled.

正解:

解説:
See the solution below.
Explanation
Solution:
kubectl get deploy front-end
kubectl edit deploy front-end -o yaml
#port specification named http
#service.yaml
apiVersion: v1
kind: Service
metadata:
name: front-end-svc
labels:
app: nginx
spec:
ports:
- port: 80
protocol: tcp
name: http
selector:
app: nginx
type: NodePort
# kubectl create -f service.yaml
# kubectl get svc
# port specification named http
kubectl expose deployment front-end --name=front-end-svc --port=80 --tarport=80 --type=NodePort


質問 # 39
Create a file:
/opt/KUCC00302/kucc00302.txt that lists all pods that implement service baz in namespace development.
The format of the file should be one pod name per line.

正解:

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

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

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


質問 # 40
Score:7%

Task
Create a new PersistentVolumeClaim
* Name: pv-volume
* Class: csi-hostpath-sc
* Capacity: 10Mi
Create a new Pod which mounts the PersistentVolumeClaim as a volume:
* Name: web-server
* Image: nginx
* Mount path: /usr/share/nginx/html
Configure the new Pod to have ReadWriteOnce access on the volume.
Finally, using kubectl edit or kubectl patch expand the PersistentVolumeClaim to a capacity of 70Mi and record that change.

正解:

解説:
Solution:
vi pvc.yaml
storageclass pvc
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-volume
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 10Mi
storageClassName: csi-hostpath-sc
# vi pod-pvc.yaml
apiVersion: v1
kind: Pod
metadata:
name: web-server
spec:
containers:
- name: web-server
image: nginx
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: my-volume
volumes:
- name: my-volume
persistentVolumeClaim:
claimName: pv-volume
# craete
kubectl create -f pod-pvc.yaml
#edit
kubectl edit pvc pv-volume --record


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

正解:

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


質問 # 42
Create a pod with image nginx called nginx and allow traffic on port 80

正解:

解説:
kubectl run nginx --image=nginx --restart=Never --port=80


質問 # 43
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:
    - 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
  • 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:
    - 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


質問 # 44
Schedule a pod as follows:
Name: nginx-kusc00101
Image: nginx
Node selector: disk=ssd

正解:

解説:
solution



質問 # 45
Create a persistent volume with nameapp-data, of capacity2Giandaccess modeReadWriteMany. Thetype of volume ishostPathand itslocation is/srv/app-data.

正解:

解説:
See the solution below.
Explanation
solution
Persistent Volume
A persistent volume is a piece of storage in aKubernetes 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 knowthe 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 PersistentVolume
kind: PersistentVolumeapiVersion: v1metadata:name:app-dataspec:capacity: # defines the capacity of PV we are creatingstorage:2Gi#the amount of storage we are tying to claimaccessModes: # defines the rights of the volumewe are creating-ReadWriteManyhostPath:path: "/srv/app-data" # path to which we are creating the volume Challenge
* Create a Persistent Volume named ReadWriteMany, storage classname
shared,2Giof 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 willchange 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. Ensurethat the Persistent Volume Claim has the same storageClassName as the persistentVolume you had previously created.
kind: PersistentVolumeapiVersion: v1metadata:name:
spec:
accessModes:-ReadWriteManyresources:
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 fromavailabletobound.
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: nullname: app-dataspec:volumes:- name:congigpvcpersistenVolumeClaim:claimName: app-datacontainers:- image: nginxname:
appvolumeMounts:- mountPath: "


質問 # 46
Create a PersistentVolumeClaim of at least 3Gi storage and access mode ReadWriteOnce and verify status is Bound

  • A. vim task-pv-claim.yaml
    apiVersion: v2
    kind: PersistentVolumeClaim
    metadata:
    name: task-pv-claim
    spec:
    storageClassName: ""
    accessModes:
    - ReadWriteOnce
    resources:
    requests:
    storage: 4Gi
    kubectl apply -f task-pv-claim.yaml
    //Verify
    kubectl get pv
    NAME CAPACITY ACCESS
    MODES RECLAIM POLICY STATUS CLAIM
    STORAGECLASS REASON AGE
    task-pv-volume 4Gi RWO
    Retain Bound default/task-pv-claim
    6m16s
    kubectl get pvc
    NAME STATUS VOLUME
    CAPACITY ACCESS MODES STORAGECLASS AGE
    task-pv-claim Bound task-pv-volume
    5Gi RWO 6s
  • B. vim task-pv-claim.yaml
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
    name: task-pv-claim
    spec:
    storageClassName: ""
    accessModes:
    - ReadWriteOnce
    resources:
    requests:
    storage: 3Gi
    kubectl apply -f task-pv-claim.yaml
    //Verify
    kubectl get pv
    NAME CAPACITY ACCESS
    MODES RECLAIM POLICY STATUS CLAIM
    STORAGECLASS REASON AGE
    task-pv-volume 5Gi RWO
    Retain Bound default/task-pv-claim
    6m16s
    kubectl get pvc
    NAME STATUS VOLUME
    CAPACITY ACCESS MODES STORAGECLASS AGE
    task-pv-claim Bound task-pv-volume
    5Gi RWO 6s

正解:B


質問 # 47
......

有効な学習方法でLinux FoundationのCKA試験をパス:https://jp.fast2test.com/CKA-premium-file.html

無料テストエンジンCertified Kubernetes Administrator (CKA) Program Exam認定試験:https://drive.google.com/open?id=1rQ4vUsf_7rl5FAinTPrJ7JI_mKvzw1PV


弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

我々の働いている時間: ( GMT 0:00-15:00 )
月曜日から土曜日まで

サポート: 現在連絡 

English Deutsch 繁体中文 한국어