[CKA][re] Mock Exam - 1 풀이 (오답 체크) By starseat 2023-04-10 16:39:32 server/oss Post Tags # udemy 연습 문제 [Certified Kubernetes Administrator (CKA) with Practice Tests](https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/) 의 **Mock Exam - 1** 의 문제 및 확인 사항 ## Q1 Deploy a pod named `nginx-pod` using the `nginx:alpine` image. ## Q2 Deploy a `messaging` pod using the `redis:alpine` image with the labels set to `tier=msg`. ## Q3 Create a namespace named `apx-x9984574`. ## Q4 Get the list of nodes in JSON format and store it in a file at `/opt/outputs/nodes-z3444kd9.json`. ## Q5 Create a service `messaging-service` to expose the `messaging` application within the cluster on port `6379`. Use imperative commands. ## Q6 Create a deployment named `hr-web-app` using the image `kodekloud/webapp-color` with 2 replicas. ## Q7 reate a static pod named `static-busybox` on the controlplane node that uses the `busybox` image and the command sleep 1000. ## Q8 - check Create a POD in the `finance` namespace named `temp-bus` with the image `redis:alpine`. ```text > kubectl run temp-bus --image=redis:alpine --namespace=finance --restart=Never ``` ## Q9 A new application `orange` is deployed. There is something wrong with it. Identify and fix the issue. ## Q10 Expose the hr-web-app as service `hr-web-app-service` application on port `30082` on the nodes on the cluster. The web application listens on port `8080`. ## Q11 - failed Use JSON PATH query to retrieve the `osImages` of all the nodes and store it in a file `/opt/outputs/nodes_os_x43kj56.txt`. The `osImages` are under the `nodeInfo` section under status of each node. ```text // 내 풀이 kubectl get nodes -o wide -o=jsonpath='{.items[*].status.nodeInfo.osImage}' > /opt/outputs/nodes_os_x43kj56.txt. // 답 kubectl get nodes -o jsonpath='{.items[*].status.nodeInfo.osImage}' > /opt/outputs/nodes_os_x43kj56.txt ``` ## Q12 - check Create a Persistent Volume with the given specification. ```yaml # pv-analytics.yaml apiVersion: v1 kind: PersistentVolume metadata: name: pv-analytics spec: capacity: storage: 100Mi accessModes: - ReadWriteMany hostPath: path: /pv/data-analytics ``` Previous Post [os] ubuntu 기본 설정 변경 및 확인 Next Post [CKA][re] Mock Exam - 2 풀이 (오답 체크)