본문 바로가기
cloud/k8s(문제풀이)

[k8s] CoreDNS in kubeernetes

by mozi2 2022. 8. 3.
반응형

1. Identify the DNS solution implemented in this cluster.

k get pods -A

A) coreDNS

 

2. How many pods of the DNS server are deployed?

k get pods -A

A) 2

 

3. What is the name of the service created for accessing CoreDNS?

kubectl get service -n kube-system

A) kube-dns

 

4. What is the IP of the CoreDNS server that should be configured on PODs to resolve services?

kubectl get service -n kube-system

A) 10.96.0.10

 

5. Where is the configuration file located for configuring the CoreDNS service?

k describe pods -n kube-system coredns-74ff55c5b-25d7g

A) /etc/coredns/Corefile

 

6. How is the Corefile passed in to the CoreDNS POD?

 

A) Configured as a ConfigMap object

 

7. What is the name of the ConfigMap object created for Corefile?

kubectl get configmap -n kube-system

A) coredns

 

8. What is the root domain/zone configured for this kubernetes cluster?

kubectl describe configmap coredns -n kube-system

A) cluster.local

 

9. ~~payroll

 

A) ok

 

10.What name can be used to access the hr web server from the test Application?

You can execute a curl command on the test pod to test. Alternatively, the test Application also has a UI. Access it using the tab at the top of your terminal named test-app.

 

A) web-service

 

11. Which of the names CANNOT be used to access the HR service from the test pod?

A) web-service.default.pod

 

12. Which of the below name can be used to access the payroll service from the test application?

k get sv
k describe svc web-service

A) web-service.payroll

 

13. Which of the below name CANNOT be used to access the payroll service from the test application?

 

A) web-service.payroll.svc.cluster

 

14.We just deployed a web server - webapp - that accesses a database mysql - server. However the web server is failing to connect to the database server. Troubleshoot and fix the issue.

They could be in different namespaces. First locate the applications. The web server interface can be seen by clicking the tab Web Server at the top of your terminal.

k get svc -n payroll
k describe deployments.apps webapp
k edit deployments.apps webapp

A)  check

 

15. From the hr pod nslookup the mysql service and redirect the output to a file /root/CKA/nslookup.out

k exec hr -- nslookup /root/CKA/nslookup.out

A) check

 

 

 

 

 

 

728x90
반응형

'cloud > k8s(문제풀이)' 카테고리의 다른 글

[따배쿠CKA-2] Pod 생성하기  (0) 2022.08.03
[따배쿠CKA -1] cka - ETCD Backup Restore  (0) 2022.08.03
[k8s] Service Networking  (0) 2022.08.03
[cka]Network- Networking weave  (0) 2022.08.03
[k8s] Network-weave  (0) 2022.08.01