Dev./Kubernetes & Helm

Kubernetes: Deployment, Rolling update

Ivan'show 2023. 10. 1.
728x90
반응형

Deployment

디플로이먼트는 파드와 레플리카셋에 대한 선언적 업데이트를 제공한다.

# simple-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
  labels:
    app: web
spec:
  replicas: 3
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
      - name: web
        image: teacherssamko/simple-web:v1
        ports:
          - containerPort: 8000

---
apiVersion: v1
kind: Service
metadata:
  name: web-lb
spec:
  type: LoadBalancer
  selector:
    app: web
  ports:
    - port: 80
      targetPort: 8000
# 너무 빨리 배포되면 롤링 확인이 되지 않으니 딜레이를 준다.
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
  labels:
    app: web
spec:
  minReadySeconds: 10
  replicas: 3
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
      - name: web
        image: teacherssamko/simple-web:v1
        ports:
          - containerPort: 8000

---
apiVersion: v1
kind: Service
metadata:
  name: web-lb
spec:
  type: LoadBalancer
  selector:
    app: web
  ports:
    - port: 80
      targetPort: 8000
k create -f simple-deploy.yaml

Rolling update

천천히 하나씩 하나씩 업데이트 되게 끔 설정

# 딜레이 확인
k describe deploy web

# to check
kimminhyeok@Ivans-Mac deployments % k describe deploy web        
Name:                   web
Namespace:              default
CreationTimestamp:      Tue, 12 Sep 2023 09:09:09 +0900
Labels:                 app=web
Annotations:            deployment.kubernetes.io/revision: 9
Selector:               app=web
Replicas:               3 desired | 3 updated | 3 total | 3 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        10
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
...
...
...

k get svc
# result

kimminhyeok@Ivans-Mac deployments % k get svc
NAME                TYPE           CLUSTER-IP       EXTERNAL-IP                                                          PORT(S)          AGE
kubernetes          ClusterIP      198.19.128.1     <none>                                                               443/TCP          5d23h
lion-db             NodePort       198.19.140.74    <none>                                                               5432:31057/TCP   4d17h
web-lb              LoadBalancer   198.19.208.71    default-web-lb-70ca6-19517486-b32f6637474d.kr.lb.naverncp.com        80:32204/TCP     9m13s
k get po
# rs 와 deployment 의 차이점으로 중간 난수로 같은 디플로이 먼트에서 관리하는 것을 알 수 있다.
# 딜레이로 인해 AGE 도 10초씩 차이가 난다.
kimminhyeok@Ivans-Mac deployments % k get po
NAME                   READY   STATUS    RESTARTS   AGE
lion-db                1/1     Running   0          20h
web-565cdfdb6b-cdhl8   1/1     Running   0          11m
web-565cdfdb6b-ghbdw   1/1     Running   0          9m23s
web-565cdfdb6b-hq64h   1/1     Running   0          9m35s

핑을 보내서 버전을 읽어 배포가 되고 있는 상황을 연출

while true; do curl <http://default-web-lb-70ca6-19517486-b32f6637474d.kr.lb.naverncp.com/>; sleep 2; done
Host Name: web-55dfd6689f-rpggb / v=1
Host Name: web-55dfd6689f-rpggb / v=1
Host Name: web-55dfd6689f-jmskl / v=1
Host Name: web-55dfd6689f-lv5dh / v=1
Host Name: web-55dfd6689f-lv5dh / v=1
Host Name: web-55dfd6689f-rpggb / v=1
Host Name: web-55dfd6689f-rpggb / v=1
Host Name: web-55dfd6689f-jmskl / v=1
Host Name: web-55dfd6689f-lv5dh / v=1
Host Name: web-55dfd6689f-rpggb / v=1
Host Name: web-55dfd6689f-lv5dh / v=1
Host Name: web-55dfd6689f-rpggb / v=1
Host Name: web-55dfd6689f-jmskl / v=1
Host Name: web-55dfd6689f-rpggb / v=1
Host Name: web-55dfd6689f-jmskl / v=1
Host Name: web-55dfd6689f-rpggb / v=1
Host Name: web-55dfd6689f-lv5dh / v=1
Host Name: web-55dfd6689f-jmskl / v=1

Image update

v1 에서 v2 로 이미지변경

# yaml 파일에서 이미지만 변경할 경우
k set image deploy web web=teacherssamko/simple-web:v2
k rollout status deploy web

# 롤링 확인
kimminhyeok@Ivans-Mac deployments % k rollout status deploy
deployment "web" successfully rolled out

image:unhealty

5번 이상 요청하면 에러가나는 이미지로 에러 테스트

# yaml 파일에서 이미지만 변경할 경우
k set image deploy web web=teacherssamko/simple-web:unhealthy
kimminhyeok@Ivans-Mac deployments % k rollout status deploy web
deployment "web" successfully rolled out
# from v2 -> unhealthy(5번 이상 요청싱 에러로 셋팅)
Host Name: web-7cf8c7d67b-4dhnc / v=2
Host Name: web-7cf8c7d67b-4dhnc / v=2
Host Name: web-85c8854d84-ndwsj / v=unhealthy / Request: 1 /
Host Name: web-85c8854d84-czbf7 / v=unhealthy / Request: 1 /
Host Name: web-85c8854d84-czwjf / v=unhealthy / Request: 1 /
Host Name: web-85c8854d84-czbf7 / v=unhealthy / Request: 2 /
Host Name: web-85c8854d84-czbf7 / v=unhealthy / Request: 3 /
Host Name: web-85c8854d84-czbf7 / v=unhealthy / Request: 4 /
Host Name: web-85c8854d84-czwjf / v=unhealthy / Request: 2 /
Host Name: web-85c8854d84-czbf7 / v=unhealthy / Request: 5 /
Too many requests
Host Name: web-85c8854d84-ndwsj / v=unhealthy / Request: 2 /
Host Name: web-85c8854d84-czwjf / v=unhealthy / Request: 3 /
Too many requestsToo many requests
Host Name: web-85c8854d84-ndwsj / v=unhealthy / Request: 3 /
Too many requests
Host Name: web-85c8854d84-czwjf / v=unhealthy / Request: 4 /
Host Name: web-85c8854d84-czwjf / v=unhealthy / Request: 5 /
Host Name: web-85c8854d84-ndwsj / v=unhealthy / Request: 4 /
Too many requestsToo many requests
Host Name: web-85c8854d84-ndwsj / v=unhealthy / Request: 5 /
Too many requestsToo many requests
Too many requestsToo many requests
Too many requestsToo many requests
Too many requestsToo many requests
Too many requestsToo many requests
Too many requestsToo many requests
Too many requestsToo many requests
Too many requestsToo many requests

에러가 발생했으니 다시 롤백으로 돌아가기

k rollout undo deploy web
kimminhyeok@Ivans-Mac deployments % k get rs                 
NAME             DESIRED   CURRENT   READY   AGE
web-55dfd6689f   0         0         0       13m
web-7cf8c7d67b   0         0         0       6m
web-85c8854d84   3         3         3       83s
kimminhyeok@Ivans-Mac deployments % k rollout undo deploy web
deployment.apps/web rolled back
kimminhyeok@Ivans-Mac deployments % k get rs
NAME             DESIRED   CURRENT   READY   AGE
web-55dfd6689f   0         0         0       13m
web-7cf8c7d67b   3         3         2       6m26s
web-85c8854d84   1         1         1       109s
kimminhyeok@Ivans-Mac deployments % k get rs
NAME             DESIRED   CURRENT   READY   AGE
web-55dfd6689f   0         0         0       13m
web-7cf8c7d67b   3         3         3       6m39s
web-85c8854d84   0         0         0       2m2s
# rollback
...
Too many requests
Too many requests
Too many requests
Too many requests
Too many requests
Too many requests
Too many requests
Too many requests
Host Name: web-7cf8c7d67b-tzz6q / v=2
Host Name: web-7cf8c7d67b-5w548 / v=2
Host Name: web-7cf8c7d67b-tzz6q / v=2
Host Name: web-7cf8c7d67b-j5z2x / v=2
Host Name: web-7cf8c7d67b-tzz6q / v=2
Host Name: web-7cf8c7d67b-5w548 / v=2
Host Name: web-7cf8c7d67b-j5z2x / v=2

deploy 의 rollback limit 확인

k get deploy web -o yaml
kimminhyeok@Ivans-Mac deployments % k get deploy web -o yaml
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
...
...
replicas: 3
revisionHistoryLimit: 10
selector:
matchLabels:
app: web
...
...

rollout 이력 확인하기

k rollout history deploy web
# 2가 없는 이유는 2를 쓰다가 3으로 넘어갔다가 새롭게 롤백을 했기 때문에
# 4와 2가 같은 revision 이라서 안보이게 되었다.
kimminhyeok@Ivans-Mac deployments % k rollout history deploy web
deployment.apps/web 
REVISION  CHANGE-CAUSE
1         <none>
3         <none>
4         <none>

change-cause 붙이기

k annotate deploy web kubernetes.io/change-cause="image roll backed v2"
kimminhyeok@Ivans-Mac deployments % k annotate deploy web kubernetes.io/change-cause="image roll backed v2"
deployment.apps/web annotated

kimminhyeok@Ivans-Mac deployments % k rollout history deploy web                                           
deployment.apps/web 
REVISION  CHANGE-CAUSE
1         <none>
3         <none>
4         image roll backed v2
# 이전 버전이 아닌 특정 버전으로 롤백하고 싶다면
k rollout undo deploy web --to-revision=1

rollout 을 중간에 멈췄다가 다시 배포 (에러 체크 가능)

k set image deploy web web=teacherssamko/simple-web:v4
k rollout pause deploy web
# 하나씩 옮겨 가는 것 확인
kimminhyeok@Ivans-Mac deployments % k get rs
NAME             DESIRED   CURRENT   READY   AGE
web-55dfd6689f   3         3         3       39m
web-565cdfdb6b   1         1         1       15m
web-7cf8c7d67b   0         0         0       32m
web-85c8854d84   0         0         0       28m
# unhealthy 처럼 5개 이상 request 했을때 에러가 나는지 확인하고 괜찮으면 resume

Host Name: web-55dfd6689f-bgjx8 / v=1
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 2 /
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 3 /
Host Name: web-55dfd6689f-t5f9k / v=1
Host Name: web-55dfd6689f-t5f9k / v=1
Host Name: web-55dfd6689f-bgjx8 / v=1
Host Name: web-55dfd6689f-ksd7x / v=1
Host Name: web-55dfd6689f-t5f9k / v=1
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 4 /
Host Name: web-55dfd6689f-ksd7x / v=1
Host Name: web-55dfd6689f-ksd7x / v=1
Host Name: web-55dfd6689f-ksd7x / v=1
Host Name: web-55dfd6689f-bgjx8 / v=1
Host Name: web-55dfd6689f-ksd7x / v=1
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 5 /
k rollout resume deploy web
# 모두 새로운 버전으로 배포
kimminhyeok@Ivans-Mac deployments % k get rs
NAME             DESIRED   CURRENT   READY   AGE
web-55dfd6689f   1         1         1       41m
web-565cdfdb6b   3         3         3       17m
web-7cf8c7d67b   0         0         0       34m
web-85c8854d84   0         0         0       29m
kimminhyeok@Ivans-Mac deployments % k get rs
NAME             DESIRED   CURRENT   READY   AGE
web-55dfd6689f   0         0         0       41m
web-565cdfdb6b   3         3         3       17m
web-7cf8c7d67b   0         0         0       34m
web-85c8854d84   0         0         0       29m
# to check
Host Name: web-565cdfdb6b-hq64h / v=4 / Request: 1 /
Host Name: web-565cdfdb6b-hq64h / v=4 / Request: 2 /
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 16 /
Host Name: web-55dfd6689f-ksd7x / v=1
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 17 /
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 18 /
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 19 /
Host Name: web-565cdfdb6b-hq64h / v=4 / Request: 3 /
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 20 /
Host Name: web-565cdfdb6b-cdhl8 / v=4 / Request: 21 /
Host Name: web-565cdfdb6b-ghbdw / v=4 / Request: 1 /
Host Name: web-565cdfdb6b-hq64h / v=4 / Request: 4 /
Host Name: web-565cdfdb6b-hq64h / v=4 / Request: 5 /
Host Name: web-565cdfdb6b-ghbdw / v=4 / Request: 2 /
Host Name: web-565cdfdb6b-hq64h / v=4 / Request: 6 /
Host Name: web-565cdfdb6b-hq64h / v=4 / Request: 7 /
Host Name: web-565cdfdb6b-ghbdw / v=4 / Request: 3 /

readinessProbe 설정

파드의 컨테이너가 요청을 처리할 준비가 되었는지 확인해보자. 설정해 두지 않으면 컨테이너가 시작되자 마자 트래픽을 받게 되므로 초기화 시간이 필요한 서비스에서 문제가 발생할 수 있다.

# 설정 위치
spec.containers[].readinessProbe
# simple-deploy.yaml
...
spec:
  minReadySeconds: 10
  replicas: 3
  selector:
    matchLabels:
      app: web
  template:
    metadata:
      labels:
        app: web
    spec:
      containers:
      - name: web
        image: teacherssamko/simple-web:v1
        ports:
          - containerPort: 8000
        readinessProbe:
          httpGet:
            path: /
            port: 8000
          initialDelaySeconds: 2
          periodSeconds: 2
...

edit 명령어로 바로 수정도 가능

kimminhyeok@Ivans-Mac deployments % k edit deploy web
deployment.apps/web edited
kimminhyeok@Ivans-Mac deployments % k rollout status deploy web
Waiting for deployment "web" rollout to finish: 2 out of 3 new replicas have been updated...
Waiting for deployment "web" rollout to finish: 2 out of 3 new replicas have been updated...
Waiting for deployment "web" rollout to finish: 2 out of 3 new replicas have been updated...
Waiting for deployment "web" rollout to finish: 2 out of 3 new replicas have been updated...
Waiting for deployment "web" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "web" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "web" rollout to finish: 1 old replicas are pending termination...
deployment "web" successfully rolled out
kimminhyeok@Ivans-Mac deployments %

readinessProbe 설정에서 에러가 잘 걸러지는지 확인해보자

k set image deploy web web=teacherssamko/simple-web:unhealthy
Host Name: web-7559c6867f-qssks / v=1
Host Name: web-7559c6867f-qssks / v=1
Host Name: web-7559c6867f-j2228 / v=1
Host Name: web-7559c6867f-j2228 / v=1
Host Name: web-7559c6867f-j2228 / v=1
Host Name: web-7559c6867f-qssks / v=1
Host Name: web-7559c6867f-fjlxt / v=1
Host Name: web-7559c6867f-fjlxt / v=1
Host Name: web-7559c6867f-qssks / v=1
Host Name: web-7559c6867f-fjlxt / v=1
Host Name: web-7559c6867f-qssks / v=1
Host Name: web-7559c6867f-qssks / v=1
Host Name: web-7559c6867f-fjlxt / v=1
Host Name: web-7559c6867f-j2228 / v=1
Host Name: web-7886b9c464-rk547 / v=unhealthy / Request: 4 /

일부러 에러를 발생시키는 이미지로 업데이트를 하고 핑을 확인해보면 계속해서 돌아가고 있는 것ㅊ 처럼 보인다.

내용을 확인해보면

kimminhyeok@Ivans-Mac deployments % k get po
NAME                   READY   STATUS    RESTARTS   AGE
lion-db                1/1     Running   0          20h
web-7559c6867f-fjlxt   1/1     Running   0          4m40s
web-7559c6867f-j2228   1/1     Running   0          4m27s
web-7559c6867f-qssks   1/1     Running   0          4m54s
web-7886b9c464-rk547   0/1     Running   0          2m48s
kimminhyeok@Ivans-Mac deployments % k logs web-7886b9c464-rk547
198.18.1.224 - - [12/Sep/2023 01:32:40] "GET / HTTP/1.1" 200 -
198.18.1.224 - - [12/Sep/2023 01:32:41] "GET / HTTP/1.1" 200 -
198.18.1.224 - - [12/Sep/2023 01:32:43] "GET / HTTP/1.1" 200 -
10.10.5.10 - - [12/Sep/2023 01:32:43] "GET / HTTP/1.1" 200 -
198.18.1.224 - - [12/Sep/2023 01:32:45] "GET / HTTP/1.1" 200 -
198.18.1.224 - - [12/Sep/2023 01:32:47] "GET / HTTP/1.1" 500 -
198.18.1.224 - - [12/Sep/2023 01:32:49] "GET / HTTP/1.1" 500 -
198.18.1.224 - - [12/Sep/2023 01:32:49] "GET / HTTP/1.1" 500 -
198.18.1.224 - - [12/Sep/2023 01:32:51] "GET / HTTP/1.1" 500 -
198.18.1.224 - - [12/Sep/2023 01:32:53] "GET / HTTP/1.1" 500 -
198.18.1.224 - - [12/Sep/2023 01:32:55] "GET / HTTP/1.1" 500 -
198.18.1.224 - - [12/Sep/2023 01:32:57] "GET / HTTP/1.1" 500 -
198.18.1.224 - - [12/Sep/2023 01:32:59] "GET / HTTP/1.1" 500 -
198.18.1.224 - - [12/Sep/2023 01:33:01] "GET / HTTP/1.1" 500 -
198.18.1.224 - - [12/Sep/2023 01:33:03] "GET / HTTP/1.1" 500 -

5번째 이후부터 500 에러가 발생하고있어서 ready 상태로 넘어가지 않았기 떄문에 롤링이 더 이상 진행되지 않고 멈춰 있었던 것!

만약 periodSeconds 가 default 값이었던 10초였다면 readiness 설정이 통과되어서 그대로 진행되 었을 것

k edit deploy web

#
...
spec:
      containers:
      - image: teacherssamko/simple-web:unhealthy
        imagePullPolicy: IfNotPresent
        name: web
        ports:
        - containerPort: 8000
          protocol: TCP
        readinessProbe:
          failureThreshold: 2
          httpGet:
            path: /
            port: 8000
            scheme: HTTP
          initialDelaySeconds: 2
          periodSeconds: 2
          successThreshold: 1
          timeoutSeconds: 1
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePo
...

그래서 실제로 롤링 업데이트를 하기 위해서는 이러한 validation 기능들을 잘 설정해 두어야 한다.

Kubernetes 를 사용한다면 이미지 태그에 latest 를 넣는 것을 권장하지 않는다.

image: likelion-cr-mh.kr.ncr.ntruss.com/lion-app:latest

그래서 버전을 직접 출력해주는 API 를 만들어서 활용해보자

# settings/base.py

VERSION = "0.1.0"
# common/views.py
from django.http import JsonResponse
from django.conf import settings

def get_version(request):
    return JsonResponse({"version:": settings.VERSION})
# project level - urls.py
from common.views import get_version

urlpatterns = [
    path("version/", get_version, name="version"),
...
...

] + static(
    settings.STATIC_URL, document_root=settings.STATIC_ROOT
)  # static 파일을 얹어줘
# common/middleware.py

from django.http import JsonResponse
from django.conf import settings
from django.http import HttpResponseServerError

class HealthcheckMiddleware:
    def __init__(self, get_response):
        self.get_response = get_response

    def __call__(self, request):
        if settings.VERSION == "unhealthy":
            return JsonResponse({"status": "unhealthy"}, status=500)

        if request.path == "/health/":
            return JsonResponse({"status": "ok"})

        return self.get_response(request)  # 그 다음 미들웨어로 보낸다...

제대로 동작하는지 확인

docker-compose up --build -d
curl <http://localhost:8000/version/docker-compose> up --build -d

#
(venv) kimminhyeok@Ivans-Mac dev_django_app % curl <http://localhost:8000/version/>
{"version:": "0.1.0"}%

같은 방식으로 3개의 버전을 더 만들고, 하나는 unhealthy 로 500 에러를 반환하게 끔 설정

# unhealthy

def get_version(request):
    global request_count
    request_count += 1

    if request_count > 3:
        return HttpResponseServerError("Error: unhealty image")

    return JsonResponse({"request_count:": request_count})
# 0.4.0
def get_version(request):
    global request_count
    request_count += 1

    response_data = {"version": settings.VERSION, "request_count:": request_count}

    return JsonResponse(response_data)

lion-app deployment

# lion-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: lion-deploy-app
  labels:
    app: lion-deploy-app
spec:
  minReadySeconds: 10
  replicas: 3
  selector:
    matchLabels:
      app: lion-deploy-app
  template:
    metadata:
      labels:
        app: lion-deploy-app
    spec:
      imagePullSecrets:
      - name: regcred
      containers:
      - name: lion-deploy-app
        imagePullPolicy: Always
        image: likelion-cr-mh.kr.ncr.ntruss.com/lion-app:0.1.0
        envFrom:
        - secretRef:
            name: db-secret
        - configMapRef:
            name: django-config
        - secretRef:
            name: django-secret
        ports:
          - containerPort: 8000
        readinessProbe:
          httpGet:
            path: /health/
            port: 8000
          initialDelaySeconds: 2
          periodSeconds: 2

---
apiVersion: v1
kind: Service
metadata:
  name: lion-deploy-lb
spec:
  type: LoadBalancer
  selector:
    app: lion-deploy-app
  ports:
    - port: 80
      targetPort: 8000
# k get svc
kimminhyeok@Ivans-Mac lion-k8s % k get svc
NAME             TYPE           CLUSTER-IP       EXTERNAL-IP                                                             PORT(S)          AGE
lion-deploy-lb   LoadBalancer   198.19.152.161   default-lion-deploy-lb-ecfa7-19522124-c8a5d8460097.kr.lb.naverncp.com   80:32418/TCP     19m
kimminhyeok@Ivans-Mac lion-k8s %
while true; do curl <http://default-lion-deploy-lb-ecfa7-19522124-c8a5d8460097.kr.lb.naverncp.com/version/>; echo ""; sleep 2; done
# result
{"version": "0.1.0", "request_count": 1}
{"version": "0.1.0", "request_count": 1}
{"version": "0.1.0", "request_count": 1}
{"version": "0.1.0", "request_count": 2}
{"version": "0.1.0", "request_count": 1}
{"version": "0.1.0", "request_count": 1}
...
...

To version 2

k set image deploy lion-deploy-app lion-deploy-app=likelion-cr-mh.kr.ncr.ntruss.com/lion-app:0.2.0
# result
{"version": "0.1.0", "request_count": 4}
{"version": "0.1.0", "request_count": 5}
{"version": "0.1.0", "request_count": 4}
{"version": "0.1.0", "request_count": 3}
{"version": "0.2.0", "request_count": 1}
{"version": "0.2.0", "request_count": 1}
...
...

To unhealthy

k set image deploy lion-deploy-app lion-deploy-app=likelion-cr-mh.kr.ncr.ntruss.com/lion-app:unhealthy
# result -> readinessProve 에서 fail 되기 때문에 올라오지 않음
{"version": "0.2.0", "request_count": 11}
{"version": "0.2.0", "request_count": 9}
{"version": "0.2.0", "request_count": 11}
{"version": "0.2.0", "request_count": 9}
{"version": "0.2.0", "request_count": 9}
{"version": "0.2.0", "request_count": 10}
...
...
kimminhyeok@Ivans-Mac lion-k8s % k get po
NAME                               READY   STATUS    RESTARTS   AGE
lion-db                            1/1     Running   0          158m
lion-deploy-app-65f5dd9fb4-2kzxg   0/1     Running   0          61s
lion-deploy-app-79d465bb56-4b685   1/1     Running   0          6m10s
lion-deploy-app-79d465bb56-qpxtn   1/1     Running   0          5m55s
lion-deploy-app-79d465bb56-v969s   1/1     Running   0          6m26s
kimminhyeok@Ivans-Mac lion-k8s % k logs lion-deploy-app-65f5dd9fb4-2kzxg

160 static files copied to '/var/www/html/static'.
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, forumapp, sessions
Running migrations:
  No migrations to apply.
[2023-09-12 07:10:03 +0000] [13] [INFO] Starting gunicorn 21.2.0
[2023-09-12 07:10:03 +0000] [13] [INFO] Listening at: <http://0.0.0.0:8000> (13)
[2023-09-12 07:10:03 +0000] [13] [INFO] Using worker: sync
[2023-09-12 07:10:03 +0000] [14] [INFO] Booting worker with pid: 14
[2023-09-12 07:10:03 +0000] [15] [INFO] Booting worker with pid: 15
[2023-09-12 07:10:03 +0000] [16] [INFO] Booting worker with pid: 16
[2023-09-12 07:10:04 +0000] [17] [INFO] Booting worker with pid: 17
[2023-09-12 07:10:04 +0000] [18] [INFO] Booting worker with pid: 18
Internal Server Error: /health/
Internal Server Error: /health/
Internal Server Error: /health/
Internal Server Error: /health/
Internal Server Error: /health/
728x90
반응형

댓글