試験問題解答ブレーン問題集でCKA試験問題集PDF問題
無料ダウンロードLinux Foundation CKAリアル試験問題
CKA試験は、実践的なタスクや課題を通じて、Kubernetes管理の知識をデモンストレーションする候補者の手で行われる実技試験です。この試験は、Kubernetesクラスターの設定や管理、一般的な問題のトラブルシューティング、Kubernetesを使用したアプリケーションの展開能力を個人の能力をテストするように設計されています。この試験はオンラインで行われ、世界中どこからでも受験することができます。
質問 # 22
List all service account and create a service account called "admin"
- A. kubectl get sa
kubectl get sa --all-namespaces
kubectl create sa admin
//Verify
kubectl get sa admin -o yaml - B. kubectl get sa
kubectl get sa --all-namespaces
//Verify
kubectl get sa admin -o yaml
正解:A
質問 # 23
Create PersistentVolume named task-pv-volume with storage 10Gi, access modes ReadWriteMany, storageClassName manual, and volume at /mnt/data and Create a PersistentVolumeClaim of at least 3Gi storage and access mode ReadWriteOnce and verify
- A. vim task-pv-volume.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: task-pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/data"
kubectl apply -f task-pv-volume.yaml
//Verify
kubectl get pv
vim task-pvc-volume.yaml
apiVersion: v1
- ReadWriteMany
resources:
requests:
storage: 3Gi
kubectl apply -f task-pvc-volume.yaml
//Verify
Kuk kubectl get pvc - B. vim task-pv-volume.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: task-pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/data"
kubectl apply -f task-pv-volume.yaml
//Verify
kubectl get pv
vim task-pvc-volume.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: task-pv-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 3Gi
kubectl apply -f task-pvc-volume.yaml
//Verify
Kuk kubectl get pvc
正解:B
質問 # 24
Get the pods with labels env=dev and env=prod and output the labels as well
正解:
解説:
kubectl get pods -l 'env in (dev,prod)' --show-labels
質問 # 25
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
kubectl describe po nginx-prod-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
正解:A
質問 # 26
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


質問 # 27
Get list of all the nodes with labels
正解:
解説:
kubectl get nodes --show-labels
質問 # 28
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
質問 # 29
List all the events sorted by timestamp and put them into file.log and verify
- A. kubectl get events --sort-by=.metadata.creationTimestamp
// putting them into file.log
kubectl get events --sort-by=.metadata.creationTimestamp >
cat test-file.log - B. kubectl get events --sort-by=.metadata.creationTimestamp
// putting them into file.log
kubectl get events --sort-by=.metadata.creationTimestamp >
test-file.log
cat test-file.log - C. kubectl get events --sort-by=.metadata.creationTimestamp
kubectl get events --sort-by=.metadata.creationTimestamp >
test-file.log
cat test-file.log
正解:B
質問 # 30
Create an nginx pod and list the pod with different levels of verbosity
正解:
解説:
// 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
質問 # 31
Create a redis pod and expose it on port 6379
- A. kubectl run redis --image=redis --restart=Never --port=6379
YAML File :
apiVersion: v1
kind: Pod
metadata:
labels:
run: redis
name: redis
spec:
containers:
- image: redis
name: redis
ports:
- containerPort: 6379
Rt restartPolicy: Always - B. kubectl run redis --image=redis --restart=Never --port=6379
YAML File :
apiVersion: v1
kind: Pod
metadata:
labels:
run: redis
name: redis
spec:
containers:
ports:
- containerPort: 6679
Rt restartPolicy: Alwaysf
正解:A
質問 # 32
Create and configure the servicefront-end-serviceso it's accessiblethroughNodePortand routes to theexisting pod namedfront-end.
正解:
解説:
See the solution below.
Explanation
solution
質問 # 33
Get list of all the pods showing name and namespace with a jsonpath expression.
正解:
解説:
kubectl get pods -o=jsonpath="{.items[*]['metadata.name' , 'metadata.namespace']}"
質問 # 34
Get list of PVs and order by size and write to file - /opt/pvlist.txt
正解:
解説:
kubectl get pv --sort-by=.spec.capacity.storage > /opt/pvlist.txt
質問 # 35
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 .
正解:
解説:
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
質問 # 36
Create a file:
/opt/KUCC00302/kucc00302.txtthatlists all pods that implement servicebazin namespacedevelopment.
The format of the file should be onepod name per line.
正解:
解説:
See the solution below.
Explanation
solution


質問 # 37
Scale the deployment webserver to
正解:
解説:
See the solution below.
Explanation
solution
F:\Work\Data Entry Work\Data Entry\20200827\CKA\14 B.JPG
質問 # 38
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
正解:
解説:
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
質問 # 39
Create a pod as follows:
Name: mongo
Using Image: mongo
In a new Kubernetes namespace named: my-website
正解:
解説:
solution
質問 # 40
......
Linux Foundation Certified Kubernetes Administrator(CKA)プログラムは、Kubernetesと協力する専門家のスキルと知識を検証する認定試験です。 Kubernetesは、コンテナ化されたアプリケーションの展開、スケーリング、および管理を自動化するオープンソースコンテナオーケストレーションプラットフォームです。 CKAプログラムは、Kubernetesクラスターをインストール、構成、および管理する個人が能力をテストするように設計されています。
最新のLinux Foundation CKAリアル試験問題集PDF:https://www.passtest.jp/Linux-Foundation/CKA-shiken.html
CKA試験問題集、CKA練習テスト問題:https://drive.google.com/open?id=1Ng8tlERMOLbze_G38z_YmxuFNpxIA7-D