"Killer Shell CKA - Ingress Create"의 두 판 사이의 차이

(새 문서: ==개요== ;Killer Shell CKA - Ingress Create * https://killercoda.com/killer-shell-cka/scenario/ingress-create * Namespace <code>world</code>에 이미 존재하는 두 Deploymen...)
 
 
(같은 사용자의 중간 판 2개는 보이지 않습니다)
7번째 줄: 7번째 줄:
Deployment가 존재하는지 확인한다.
Deployment가 존재하는지 확인한다.
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
controlplane:~$ kubectl -n world get deploy
controlplane:~$ k -n world get deploy
NAME    READY  UP-TO-DATE  AVAILABLE  AGE
NAME    READY  UP-TO-DATE  AVAILABLE  AGE
asia    3/3     3           3           12m
asia    2/2     2           2           4m4s
europe  3/3     3           3           12m
europe  2/2     2           2           4m4s
</syntaxhighlight>
</syntaxhighlight>


16번째 줄: 16번째 줄:
각 Deployment를 대상으로 ClusterIP Service(기본 타입)를 포트 80으로 생성한다.
각 Deployment를 대상으로 ClusterIP Service(기본 타입)를 포트 80으로 생성한다.
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
controlplane:~$ kubectl -n world expose deploy europe --port=80
controlplane:~$ k -n world expose deploy europe --port 80
service/europe exposed
service/europe exposed


controlplane:~$ kubectl -n world expose deploy asia --port=80
controlplane:~$ k -n world expose deploy asia --port 80
service/asia exposed
service/asia exposed
</syntaxhighlight>
</syntaxhighlight>

2025년 9월 23일 (화) 20:49 기준 최신판

1 개요[ | ]

Killer Shell CKA - Ingress Create

2 사전 확인[ | ]

Deployment가 존재하는지 확인한다.

controlplane:~$ k -n world get deploy
NAME     READY   UP-TO-DATE   AVAILABLE   AGE
asia     2/2     2            2           4m4s
europe   2/2     2            2           4m4s

3 Service 생성[ | ]

각 Deployment를 대상으로 ClusterIP Service(기본 타입)를 포트 80으로 생성한다.

controlplane:~$ k -n world expose deploy europe --port 80
service/europe exposed

controlplane:~$ k -n world expose deploy asia --port 80
service/asia exposed

참고:

  • kubectl expose는 기본적으로 Service 타입을 ClusterIP로 생성한다.
  • 필요 시 컨테이너의 실제 리스닝 포트가 80이 아닐 경우 --target-port를 명시한다. 예: --target-port=8080

4 검증[ | ]

Service가 생성되고, Endpoints가 정상적으로 연결되었는지 확인한다.

controlplane:~$ kubectl -n world get svc
NAME     TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
asia     ClusterIP   10.96.143.210   <none>        80/TCP    5s
europe   ClusterIP   10.96.212.37    <none>        80/TCP    9s

controlplane:~$ kubectl -n world get endpoints
NAME     ENDPOINTS                         AGE
asia     10.244.0.12:80,10.244.0.13:80...  8s
europe   10.244.0.9:80,10.244.0.10:80...   12s

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}