-
completed.yaml : sleep 5초 후 종료 코드 0 반환 후 종료
apiVersion: v1 kind: Pod metadata: name: completed-pod spec: containers: - name: completed-pod
- hostpath.yaml
apiVersion: v1
kind: Pod
metadata:
name: hostpath
spec:
containers:
- name: hostpath
-
command(실행 명령) & args(파라미터)
- 파드 생성 시 실행 명령(command = 도커의 Entrypoint)과 전달인자(args = 도커의 Cmd)를 전달할 수 있습니다
- nginx 기본 이미지를 파드로 생성 시 실행 명령을 확인
# nginx 파드 생성 kubectl run cmd-args --image nginx # 생성된 워커 노드 확인 kubectl get pod -owide
- 파드에 라벨(레이블) 설정 후 셀렉터를 통한 확인
-
labels.yaml
apiVersion: v1 kind: Pod metadata: name: myweb1 labels: environment: production
-
# Pod 생성
## 다른 터미널에서 watch -d 'kubectl get pod' 실행 시 파드 정보 출력으로 이해를 돕는다
## 워커 노드에서는 watch -d 'docker ps --format "table {{.Image}}\t{{.Status}}\t{{.Names}}"' 실행 시 파드 정보 출력으로 이해를 돕는다
## 혹시 남아있는 Pod 삭제
kubectl delete pod --all
# YAML 파일 생성 : YAML 파일에 컨테이너가 사용할 포트(TCP 80)을 설정
## apply -f(file) 선언형 명령은 멱등성을 보장하여 여러번 실행하더라도 항상 YAML 정의서에 선언된 내용과 동일한 결과를 얻을 수 있습니다
# 엔터 입력 후 아래 apiVersion~protocol 복사 붙여넣기
안녕하세요, 마이크로소프트에서 한 달 동안 점심시간을 활용해 Azure 학습하기라는 eBook을 [한글로 무료 번역하여 제공][Azure learn lunch KR 1st]하고 있습니다. 현재 영어 eBook은 2판으로 업데이트 되었으며, 오디오북 또한 지원하고 있으니 관심있는 분들은 참고하셨으면 합니다.
#웹서비스, #네트워킹, #가상머신, #서버리스, #오디오책
- 한글 eBook 자료 (1st Edition): [링크][Azure learn lunch KR 1st]
- 최신 (현재, 2nd Editon) 영어 eBook 다운로드 (등록 필요): [링크][Azure learn lunch EN 2nd info]
- 영어 Audiobook 확인: [링크][Azure learn lunch EN 2nd audio]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install fairlearn |