Skip to content

2. 주요 사용방법 _ 추가

kimsanghoon1 edited this page Mar 19, 2019 · 4 revisions

선택한 Namespace와, Type을 기준으로 YAML을 작성하여 배포한다.

추가 방법

  1. ADD 버튼을 클릭한다.
  2. 작성되어있는 YAML파일 (현재 ---로 여러개로 나뉘어져 있는 YAML 파일은 불가) 을 불러오거나 또는 Template을 선택하여 기본 형태를 로드한다.
  3. YAML을 작성 후, Confirm 버튼을 누르면 배포된다.

예제

nginx pod를 default namespace에 배포하는 방법.

  1. namespace default 설정, pod를 조회한 화면에서 Add버튼을 클릭하고 Template를 누르면 기본 pod yaml의 형태가 나온다. image

  2. 작성은 왼쪽 CodeEditor와, 오른쪽의 Input 에서 모두 작성가능하다. image

  3. CodeEditor에 있는 Download를 통하여서 작성된 yaml파일을 다운로드 받아서 재사용 할 수있다.

  4. 오른쪽의 Input창에 podname과, pod image에 nginx 를 입력 후 confirm을 누른다.

  5. 배포가 된 것을 확인 할 수 있다. image

# pod 조회
example@ex~$ kubectl get po -w
NAME                                       READY   STATUS    RESTARTS   AGE
deploy-monitor-676768f57b-vksn2            2/2     Running   0          4d2h
pod-monitor-576ddd78b-xf7rm                2/2     Running   0          6d2h
service-kube-controller-5f68c6b48d-vgp9n   2/2     Running   0          4d2h
service-monitor-6bc8dd946-pn2g7            2/2     Running   0          6d2h
serviceapi-bb7d6458b-nmznt                 2/2     Running   0          4d2h
serviceui-679b6b749f-lpjl4                 2/2     Running   0          10d
nginx   0/2   Pending   0     0s
nginx   0/2   Pending   0     0s
nginx   0/2   Init:0/1   0     0s
nginx   0/2   PodInitializing   0     2s
nginx   2/2   Running   0     10s
아래의 Kubernetes 명령어와 같다.
# pod 등록
example@ex~$ kubectl apply -f example.yaml
Clone this wiki locally