IT 강의/도커 쿠버

[CKA 강의 요약] Practice Test - Services

rnany 2024. 6. 27. 22:20

Udemy의 Certified Kubernetes Administrator (CKA) with Practice Tests  강의의 39. Practice Test - Services,  40. Solution - Services (optional)  챕터를 공부한 내용으로 강의 내용과 다를 수 있습니다. 정확한 내용은 강의를 들으시는 것을 추천드립니다.


https://uklabs.kodekloud.com/topic/practice-test-services-2/ 에서 핸즈온을 사용 할 수 있다.

 

Q1. How many Services exist on the system?
A. kubectl get service



Q2. Information only (That is a default service created by Kubernetes at launch.)



Q3. What is the type of the default kubernetesservice?
A. kubectl get service



Q4. What is the targetPortconfigured on the kubernetesservice?
A. kubectl describe service / kubectl describe svc kubernetes



Q5. How many labels are configured on the kubernetesservice?
A. kubectl describe service / kubectl describe svc kubernetes


Q6. How many Endpoints are attached on the kubernetesservice?
A. kubectl describe service / kubectl describe svc kubernetes


Q7. How many Deployments exist on the system now? (In the current(default) namespace)
A. kubectl get deployments / kubectl describe deployments simple-webapp-deployment


Q8. What is the image used to create the pods in the deployment?
A. kubectl describe pods / kubectl describe deployments simple-webapp-deployment

Q9. Are you able to access the Web App UI?
A. NO(502 bad gateway)

Q10. Create a new service to access the web application using the service-definition-1.yaml file.
A.하단과 같이 설정 파일 수정 후 kubectl create -f service-definition-1.yaml

vim service-definition-1.yaml 

---
apiVersion: v1
kind: Service
metadata:
  name: webapp-service
  namespace: default
spec:
  ports:
  - nodePort: 30080
    port: 8080
    targetPort: 8080
  selector:
    name: simple-webapp
  type: NodePort



Q11. Access the web application using the tab simple-webapp-ui above the terminal window.

A. 웹 접근 가능