Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
joohanhong
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JooHan Hong
joohanhong
Commits
a15da076
Commit
a15da076
authored
Apr 05, 2021
by
JooHan Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hongsnet.net node affinity 적용추가
parent
2609635d
Pipeline
#5335
passed with stages
in 1 minute and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
11 deletions
+26
-11
README.md
DOCKER/K8S/HONGSNET/README.md
+26
-11
No files found.
DOCKER/K8S/HONGSNET/README.md
View file @
a15da076
...
...
@@ -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
:
1
0
minReplicas
:
6
maxReplicas
:
1
2
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 현황
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment