[Mock2_8] Static pod

유유·2023년 2월 1일
0

CKA

목록 보기
17/19

스태틱(static) 파드 생성하기

Create a static pod on node01 called nginx-critical with image nginx and make sure that it is recreated/restarted automatically in case of a failure.

Use /etc/kubernetes/manifests as the Static Pod path for example.

static pod configured under /etc/kubernetes/manifests ?

Pod nginx-critical-node01 is up and running

*template*

cat <<EOF >/etc/kubernetes/manifests/static-web.yaml
apiVersion: v1
kind: Pod
metadata:
  name: nginx-critical
  labels:
    role: nginx-critical
spec:
  containers:
    - name: nginx-critical
      image: nginx
      ports:
        - name: web
          containerPort: 80
          protocol: TCP
EOF
profile
하이

0개의 댓글