Commit a15da076 authored by JooHan Hong's avatar JooHan Hong

hongsnet.net node affinity 적용추가

parent 2609635d
Pipeline #5335 passed with stages
in 1 minute and 10 seconds
......@@ -85,7 +85,7 @@ metadata:
app: hongsnet
name: hongsnet-web
spec:
replicas: 5
replicas: 6
strategy:
type: RollingUpdate
rollingUpdate:
......@@ -99,6 +99,15 @@ spec:
labels:
app: hongsnet
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: key
operator: In
values:
- worker
volumes:
- name: webeditor-hongsnet-volume
persistentVolumeClaim:
......@@ -169,8 +178,8 @@ spec:
apiVersion: apps/v1
kind: Deployment
name: hongsnet-web
minReplicas: 5
maxReplicas: 10
minReplicas: 6
maxReplicas: 12
targetCPUUtilizationPercentage: 80
```
......@@ -207,20 +216,26 @@ kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 23h
```bash
# kubectl get pods -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
hongsnet-web-54b64478f9-6ff9x 1/1 Running 0 7h50m 10.244.1.5 tb2 <none> <none>
hongsnet-web-54b64478f9-7bzjw 1/1 Running 0 7h50m 10.244.1.6 tb2 <none> <none>
hongsnet-web-54b64478f9-gtsmt 1/1 Running 0 7h50m 10.244.2.6 tb3 <none> <none>
hongsnet-web-54b64478f9-sqdrm 1/1 Running 0 7h50m 10.244.3.4 tb3-docker <none> <none>
hongsnet-web-54b64478f9-vh7lf 1/1 Running 0 7h50m 10.244.2.5 tb3 <none> <none>
hongsnet-web-66cbcd57c7-fj9vq 1/1 Running 0 4m16s 10.244.1.53 tb2 <none> <none>
hongsnet-web-66cbcd57c7-hr698 1/1 Running 0 8m49s 10.244.2.46 tb3 <none> <none>
hongsnet-web-66cbcd57c7-nt7vs 1/1 Running 0 9m2s 10.244.3.36 tb3-docker <none> <none>
hongsnet-web-66cbcd57c7-qmxwn 1/1 Running 0 8m57s 10.244.2.45 tb3 <none> <none>
hongsnet-web-66cbcd57c7-v97sn 1/1 Running 0 8m45s 10.244.1.49 tb2 <none> <none>
hongsnet-web-66cbcd57c7-wnmwm 1/1 Running 0 8m53s 10.244.3.37 tb3-docker <none> <none>
```
## Node Affinity의 적용
> Master Node의 Default **Taint 설정**으로 인해, 실질적으로 배포되는 Node는 `3`개 이다. 따라서 `Node Affinity`를 적용하여, 모든 Node가 균등하게 배포되도록 적용한다.
# Replicas의 현황
```bash
# ./kube-replicaget.sh
NAME DESIRED CURRENT READY AGE
hongsnet-web-54b64478f9 5 5 5 7h51m
hongsnet-web-66cbcd57c7 6 6 6 9m27s
```
# Deployment의 현황
......@@ -228,7 +243,7 @@ hongsnet-web-54b64478f9 5 5 5 7h51m
```bash
# ./kube-getdeploy.sh
NAME READY UP-TO-DATE AVAILABLE AGE
hongsnet-web 5/5 5 5 7h48m
hongsnet-web 6/6 6 6 3d9h
```
# 전체 Namespace 현황
......@@ -276,7 +291,7 @@ tb3-docker Ready <none> 17h v1.20.4 beta.kubernetes.io/
```bash
# kubectl get hpa
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
hongsnet-web Deployment/hongsnet-web 0%/80% 5 10 5 7h51m
hongsnet-hpa Deployment/hongsnet-web 0%/80% 6 12 6 3d9h
```
# HA-Proxy Back-end 현황
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment