[2025年11月] 確実合格する有効な方法Linux Foundation試験問題集でCKA試験学習ガイド
CKA問題集とCertified Kubernetes Administrator (CKA) Program Examトレーニングコースでお客様の合格を楽にさせる学習合格試験問題!
認定されたKubernetes Administrator(CKA)プログラム認定試験は、Kubernetesクラスターを管理、展開、トラブルシューティングする個人のスキルを検証する業界で認識された資格情報です。 Kubernetesは、コンテナ化されたアプリケーションを管理するための好ましい選択肢となっているオープンソースのコンテナオーケストレーションシステムです。 Linux Foundationは、このテクノロジーの専門家の知識と経験を検証するためのCKAプログラムを提供しています。
質問 # 13
Score: 4%
Context
You have been asked to create a new ClusterRole for a deployment pipeline and bind it to a specific ServiceAccount scoped to a specific namespace.
Task
Create a new ClusterRole named deployment-clusterrole, which only allows to create the following resource types:
* Deployment
* StatefulSet
* DaemonSet
Create a new ServiceAccount named cicd-token in the existing namespace app-team1.
Bind the new ClusterRole deployment-clusterrole lo the new ServiceAccount cicd-token , limited to the namespace app-team1.
正解:
解説:
See the solution below.
Explanation
Solution:
Task should be complete on node -1 master, 2 worker for this connect use command
[student@node-1] > ssh k8s
kubectl create clusterrole deployment-clusterrole --verb=create
--resource=deployments,statefulsets,daemonsets
kubectl create serviceaccount cicd-token --namespace=app-team1
kubectl create rolebinding deployment-clusterrole --clusterrole=deployment-clusterrole
--serviceaccount=default:cicd-token --namespace=app-team1
質問 # 14
You have a Deployment named 'api-server' with 4 replicas of an API server container. You need to implement a rolling update strategy that allows for a maximum of 2 pods to be unavailable at any given time. You also want to ensure that the update process is triggered automatically whenever a new image is pushed to the Docker Hub repository "my.org/api-server:latest'. Furthermore, you want to ensure that the update process is completed within a specified timeout of 5 minutes. If the update fails to complete within the timeout, the deployment should revert to the previous version.
正解:
解説:
See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1. Update the Deployment YAML:
- Update the 'replicas' to 4.
- Define 'maxUnavailable: 2' and maxSurge: in the 'strategy.rollingUpdate' section to control the rolling update process.
- Configure a 'strategy.type' to to trigger a rolling update when the deployment is updated.
- Set 'spec.template.spec.containers[0].imagePullPolicy: Always' to ensure that the new image is pulled even if it exists in the pod's local cache.
- Add a 'spec.progressDeadlineSeconds: 300' to set a timeout of 5 minutes for the update process.
2. Create the Deployment: - Apply the updated YAML file using 'kubectl apply -f api-server.yaml' 3. Verify the Deployment: - Check the status of the deployment using "kubectl get deployments api-server' to confirm the rollout and updated replica count. 4. Trigger the Automatic Update: - Push a new image to the 'my.org/api-server:latest' Docker Hub repository. 5. Monitor the Deployment: - Use Vxubectl get pods -l app=api-server' to monitor the pod updates during the rolling update process. 6. Observe Rollback if Timeout Exceeds: - If the update process takes longer than 5 minutes to complete, the deployment will be rolled back to the previous version. This can be observed using 'kubectl describe deployment api-server' and checking the 'updatedReplicas' and 'availableReplicas' fields.
質問 # 15
List all persistent volumes sorted by capacity, saving the full kubectl output to
/opt/KUCC00102/volume_list. Use kubectl 's own functionality for sorting the output, and do not manipulate it any further.
正解:
解説:
See the solution below.
Explanation
solution
質問 # 16
Score: 4%
Task
Create a persistent volume with name app-data , of capacity 1Gi and access mode ReadOnlyMany. The type of volume is hostPath and its location is /srv/app-data .
正解:
解説:
Solution:
#vi pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: app-config
spec:
capacity:
storage: 1Gi
accessModes:
- ReadOnlyMany
hostPath:
path: /srv/app-config
#
kubectl create -f pv.yaml
質問 # 17
Create a configmap called myconfigmap with literal value
appname=myapp
- A. kubectl create cm myconfigmap --from-literal=appname=myapp
// Verify
kubectl get cm -o yaml
(or)
kubectl describe cm - B. kubectl create cm myconfigmap --from-literal=appname=myapp
// Verify
(or)
kubectl describe cm
正解:A
質問 # 18
Create a job named "hello-job" with the image busybox which echos "Hello I'm running job"
- A. kubectl create job hello-job --image=busybox --dry-run -o yaml
-- echo "Hello I'm running job" > hello-job.yaml
kubectl create -f hello-job.yaml
//Verify Job
kubectl get po
kubectl logs hello-job-* - B. kubectl create job hello-job --image=busybox --dry-run -o yaml
-- echo "Hello I'm running job" > hello-job.yaml
kubectl create -f hello-job.yaml
//Verify Job
kubectl get job
kubectl get po
kubectl logs hello-job-*
正解:B
質問 # 19
Task Weight: 4%
Task
Scale the deployment webserver to 3 pods.
正解:
解説:
Solution:
質問 # 20
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
F:\Work\Data Entry Work\Data Entry\20200827\CKA\5 B.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\5 C.JPG
F:\Work\Data Entry Work\Data Entry\20200827\CKA\5 D.JPG
質問 # 21
What file type upload is supported as part of the basic WildFire service?
- A. ELF
- B. VBS
- C. BAT
- D. PE
正解:D
質問 # 22
Print pod name and start time to "/opt/pod-status" file
正解:
解説:
kubect1 get pods -o=jsonpath='{range
.items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'
質問 # 23
List "nginx-dev" and "nginx-prod" pod and delete those pods
正解:
解説:
kubect1 get pods -o wide
kubectl delete po "nginx-dev" kubectl delete po "nginx-prod"
質問 # 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
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
質問 # 26
Monitor the logs of pod foo and:
* Extract log lines corresponding to error
unable-to-access-website
* Write them to/opt/KULM00201/foo
正解:
解説:

Step 0: Set the correct Kubernetes context
If you're given a specific context (k8s in this case), you must switch to it:
kubectl config use-context k8s
## Skipping this can cause you to work in the wrong cluster/namespace and cost you marks.
Step 1: Identify the namespace of the pod foo
First, check if foo is running in a specific namespace or in the default namespace.
kubectl get pods --all-namespaces | grep foo
Assume the pod is in the default namespace if no namespace is mentioned.
Step 2: Confirm pod foo exists and is running
kubectl get pod foo
You should get output similar to:
NAME READY STATUS RESTARTS AGE
foo 1/1 Running 0 1h
If the pod is not running, logs may not be available.
Step 3: View logs and filter specific error lines
We're looking for log lines that contain:
unable-to-access-website
Command:
kubectl logs foo | grep "unable-to-access-website"
Step 4: Write the filtered log lines to a file
Redirect the output to the required path:
kubectl logs foo | grep "unable-to-access-website" > /opt/KULM00201/foo
# This creates or overwrites the file /opt/KULM00201/foo with the filtered logs.
# You may need sudo if /opt requires elevated permissions. But in most exam environments, you're already the root or privileged user.
Step 5: Verify the output file (optional but smart)
Check that the file was created and has the correct content:
cat /opt/KULM00201/foo
# Final Answer Summary:
kubectl config use-context k8s
kubectl logs foo | grep "unable-to-access-website" > /opt/KULM00201/foo
質問 # 27
Update the deployment with the image version 1.16.1 and verify the image and check the rollout history
正解:
解説:
kubectl set image deploy/webapp nginx=nginx:1.16.1 kubectl describe deploy webapp | grep Image kubectl rollout history deploy webapp
質問 # 28
You have a Kubernetes cluster with a Deployment named 'web-app' that runs a web application. You need to set up a mechanism to automatically scale the deployment based on the CPU utilization of the pods. The scaling should be triggered when the average CPU utilization across all pods reaches 70%. You should set the minimum and maximum replicas to 2 and 5 respectively.
正解:
解説:
See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1. Create a Horizontal Pod Autoscaler (HPA):
- Use "kubectl create hpa' command to create an HPA resource.
- Specify the name of the HPA, the Deployment to scale, the target CPU utilization (70%), and the minimum and maximum replicas.
kubectl create hpa web-app-hpa --min=2 --max=5 --cpu-utilization-percentage=70 --target- ref=Deployment/web-app
2. Verify the HPA Creation:
- Use 'kubectl get hpa' command to check if the HPA was created successfully. You should see an HPA named 'web-app-hpa' with the configured settings.
3. Monitor the Scaling Behavior:
- You can use the 'kubectl get pods -l command to monitor the number of pods running as the CPU utilization changes.
- When the average CPU utilization across the pods reaches 70%, the HPA will automatically scale up the Deployment to add more pods.
- Conversely, when the CPU utilization falls below the threshold, the HPA will scale down the Deployment to reduce the number of pods.
Ensure that the 'metrics-server' is installed in your cluster to enable CPU utilization monitoring.,
質問 # 29
You must connect to the correct host.
Failure to do so may result in a zero score.
[candidate@base] $ ssh Cka000047
Task
A MariaDB Deployment in the mariadb namespace has been deleted by mistake. Your task is to restore the Deployment ensuring data persistence. Follow these steps:
Create a PersistentVolumeClaim (PVC ) named mariadb in the mariadb namespace with the following specifications:
Access mode ReadWriteOnce
Storage 250Mi
You must use the existing retained PersistentVolume (PV ).
Failure to do so will result in a reduced score.
There is only one existing PersistentVolume .
Edit the MariaDB Deployment file located at ~/mariadb-deployment.yaml to use PVC you created in the previous step.
Apply the updated Deployment file to the cluster.
Ensure the MariaDB Deployment is running and stable.
正解:
解説:
Task Overview
You're restoring a MariaDB deployment in the mariadb namespace with persistent data.
# Tasks:
* SSH into cka000047
* Create a PVC named mariadb:
* Namespace: mariadb
* Access mode: ReadWriteOnce
* Storage: 250Mi
* Use the existing retained PV (there's only one)
* Edit ~/mariadb-deployment.yaml to use the PVC
* Apply the deployment
* Verify MariaDB is running and stable
Step-by-Step Solution
1## SSH into the correct host
ssh cka000047
## Required - skipping = zero score
2## Inspect the existing PersistentVolume
kubectl get pv
# Identify the only existing PV, e.g.:
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS
mariadb-pv 250Mi RWO Retain Available <none> manual
Ensure the status is Available, and it is not already bound to a claim.
3## Create the PVC to bind the retained PV
Create a file mariadb-pvc.yaml:
cat <<EOF > mariadb-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mariadb
namespace: mariadb
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 250Mi
volumeName: mariadb-pv # Match the PV name exactly
EOF
Apply the PVC:
kubectl apply -f mariadb-pvc.yaml
# This binds the PVC to the retained PV.
4## Edit the MariaDB Deployment YAML
Open the file:
nano ~/mariadb-deployment.yaml
Look under the spec.template.spec.containers.volumeMounts and spec.template.spec.volumes sections and update them like so:
Add this under the container:
yaml
CopyEdit
volumeMounts:
- name: mariadb-storage
mountPath: /var/lib/mysql
And under the pod spec:
volumes:
- name: mariadb-storage
persistentVolumeClaim:
claimName: mariadb
# These lines mount the PVC at the MariaDB data directory.
5## Apply the updated Deployment
kubectl apply -f ~/mariadb-deployment.yaml
6## Verify the Deployment is running and stable
kubectl get pods -n mariadb
kubectl describe pod -n mariadb <mariadb-pod-name>
# Ensure the pod is in Running state and volume is mounted.
# Final Command Summary
ssh cka000047
kubectl get pv # Find the retained PV
# Create PVC
cat <<EOF > mariadb-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mariadb
namespace: mariadb
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 250Mi
volumeName: mariadb-pv
EOF
kubectl apply -f mariadb-pvc.yaml
# Edit Deployment
nano ~/mariadb-deployment.yaml
# Add volumeMount and volume to use the PVC as described
kubectl apply -f ~/mariadb-deployment.yaml
kubectl get pods -n mariadb
質問 # 30
......
リアル試験問題と解答Linux Foundation CKA問題集はここに:https://drive.google.com/open?id=1xwv9q3N9Cyls83nGB6TJ6ffFr75rQDpq
最新 [2025年11月] 効果的な学習法で試験合格できるCKA:https://www.jpntest.com/shiken/CKA-mondaishu