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

[cka] kodekloud-namespaces

by mozi2 2022. 6. 7.
반응형

이번에는 namespaces 관련된 문제를 풀어보자 

 

1. How many Namespaces exist on the system?

# k get ns

 

A) 10

 

2. How many pods exist in the research namespace?

# k get pods -n research

A)2

 

3.Create a POD in the finance namespace. Use the spec given below.

# k run redis --image=redis -n finance

4. Which namespace has the blue pod in it?

# k get pods --all-namespaces

  또는 # k get pods -all-namespaces | grep blue

A) marketing

 

5. Access the Blue web application using the link above your terminal. From the UI you can ping other services

 

 

6.What DNS name should the Blue application use to access the database db-service in its own namespace - marketing. You can try it in the web application UI. Use port 6379.

# k get pods --all-namespaces

 : database 인 db-service 와 DNS 가 동일 

 

7.What DNS name should the Blue application use to access the database 'db-service' in the 'dev' namespace. You can try it in the web application UI. Use port 6379.

: 서비스 이름은 db 의 ns 를 따라간다.

 

A) db-service.dev.svc.cluster.local

728x90
반응형

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

[cka] kodekloud - IMPERATIVE COMMANDS  (0) 2022.06.07
[cka]kodekloud-services  (0) 2022.06.07
[cka]kodekloud-Deployments  (0) 2022.06.07
[cka]kodekloud-replicasets  (0) 2022.06.07
[cka]kodekloud-pods  (0) 2022.06.07