Kubernetes
23.8.30(수) 쿠버네티스 4일차
사실 나도 모름
2023. 9. 1. 15:00
https://kubernetes.io/ko/docs/concepts/workloads/pods/pod-lifecycle/
파드 라이프사이클
이 페이지에서는 파드의 라이프사이클을 설명한다. 파드는 정의된 라이프사이클을 따른다. Pending 단계에서 시작해서, 기본 컨테이너 중 적어도 하나 이상이 OK로 시작하면 Running 단계를 통과하
kubernetes.io
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx:1.14
name: nginx
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: Pod 실행후 delay할 시간
periodSeconds: Health check 반복 실행 시간
timeoutSeconds: Health check 후 응답을 기다리는 시간
successThreshold: 성공 임계값 시간
failureThreshold: 실패 임계값 시간
cat<<EOF>probe-exec-nginx.yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: nginx:1.14
name: nginx
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep 30; rm -f /tmp/healthy; sleep 600
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3
EOF
https://kubernetes.io/ko/docs/concepts/workloads/pods/init-containers/
초기화 컨테이너
https://kubernetes.io/ko/docs/tasks/configure-pod-container/static-pod/
스태틱 파드 생성하기
https://kubernetes.io/ko/docs/concepts/workloads/pods/init-containers/
파드 및 컨테이너 리소스 파일