๐Ÿ”ฅ TIL - Day 57

Kim Dae Hyunยท2021๋…„ 11์›” 16์ผ
0

TIL

๋ชฉ๋ก ๋ณด๊ธฐ
68/93

๐Ÿ“Œ ๋„์ปค์˜ ํ•œ๊ณ„ (์™œ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋ฅผ ์“ฐ๋Š”๊ฐ€?)

์—ฌ๋Ÿฌ ๊ฐœ์˜ ์„œ๋ฒ„ ์ธ์Šคํ„ด์Šค์— ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๋ฐฐํฌํ•˜๊ณ  ์šด์˜,๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•จ์ด๋‹ค.

ํ™•์žฅ์˜ ๋ฌธ์ œ

  • ๋„์ปค๋งŒ์œผ๋กœ๋Š” ์Šค์ผ€์ผ ์•„์›ƒ์ด ํž˜๋“ค๋‹ค.
  • ๋งŒ์•ฝ ๋„์ปค๋งŒ์œผ๋กœ ์Šค์ผ€์ผ ์•„์›ƒ์„ ํ•˜๋ ค๋ฉด ๋„์ปค๊ฐ€ ๊ตฌ๋™๋˜๋Š” ์ธ์Šคํ„ด์Šค๋ฅผ ๋Š˜๋ ค์ฃผ๊ณ  ํ•ด๋‹น ์ธ์Šคํ„ด์Šค์— ๋„์ปค์•  ๋Œ€ํ•œ ์„ค์ •์„ ํ•ด์ค˜์•ผ ํ•œ๋‹ค.

๊ด€๋ฆฌ์˜ ๋ฌธ์ œ

  • ์Šค์ผ€์ผ์•„์›ƒ์„ ์œ„ํ•ด ์—ฌ๋Ÿฌ ์ธ์Šคํ„ด์Šค์— ๋„์ปค๋ฅผ ์„ค์น˜ํ•œ๋‹ค๋ฉด ์ด๋ฅผ ํ†ตํ•ฉํ•ด์„œ ๊ด€๋ฆฌํ•˜๋Š”๋ฐ ์–ด๋ ค์›€์ด ์ƒ๊ธด๋‹ค.
  • ๋‹ค๋ฅธ ์ธ์Šคํ„ด์Šค์˜ ๋„์ปค ์ปจํ…Œ์ด๋„ˆ ๊ฐ„ ํ†ต์‹ ์— ์–ด๋ ค์›€์ด ์žˆ๋‹ค.

๐Ÿ“Œ Kubernetes ์•„ํ‚คํ…์ฒ˜

  • Master-node (slave) ๊ตฌ์กฐ
    • Master: ๋…ธ๋“œ์— ๋ฐฐํฌ๋œ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๊ด€๋ฆฌ
    • Node: ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ๋ฐฐํฌ๋˜๋Š” ํ™˜๊ฒฝ (์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ๊ตฌ๋™๋˜๋Š” ํ™˜๊ฒฝ)
    • Pod: ๋ฐฐํฌ๋‹จ์œ„ ์ค‘ ๊ฐ€์žฅ ์ž‘์€ ๋‹จ์œ„ (์ปจํ…Œ์ด๋„ˆ์™€ ๊ฑฐ์˜ ๊ฐ™์€ ๋Š๋‚Œ?)
  • API Server <-> Kubelet
  • etcd:ย key-value ์ €์žฅ์†Œ
  • scheduler: ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์–ด๋””์— ๋ฐฐ์น˜ํ• ์ง€ ๊ฒฐ์ •

๐Ÿ“Œ Master ์ƒ์„ฑ

CPU 2๊ฐœ ์ด์ƒ, ๋ฉ”๋ชจ๋ฆฌ 1700MB์ด์ƒ (t3.small)

๋„์ปค ์„ค์น˜

1. apt ์—…๋ฐ์ดํŠธ

sudo apt-get update

2. ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜

sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release

3. ์ƒค์ด๋‹ํ‚ค ๋‹ค์šด๋กœ๋“œ

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

4. ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ถ”๊ฐ€

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

5. apt ์—…๋ฐ์ดํŠธ

sudo apt-get update

6. ๋„์ปค์„ค์น˜

sudo apt-get install -y docker-ce docker-ce-cli containerd.io

7. ์‹คํ–‰๊ถŒํ•œ ์กฐ์ •

sudo usermod -aG docker $USER

๋งˆ์Šคํ„ฐ ์„ค์น˜

1. EC2 ์ธ๋ฐ”์šด๋“œ ํŽธ์ง‘

TCP 6443 โžก๏ธ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค API ์„œ๋ฒ„
TCP 2379-2480 โžก๏ธ etcd ์„œ๋ฒ„ ํด๋ผ์ด์–ธํŠธ API
TCP 10250 โžก๏ธ kubelet API
TCP 10251 โžก๏ธ kube scheduler
TCP 10252 โžก๏ธ Kube-controller-manager
UDP 8472 โžก๏ธ CNI ๊ด€๋ จ
UDP 8285 โžก๏ธ CNI ๊ด€๋ จ

2. ๊ตฌ๊ธ€ ํด๋ผ์šฐ๋“œ ๊ณต๊ฐœ ์‚ฌ์ด๋‹ ํ‚ค ๋‹ค์šด๋กœ๋“œ

sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg

3. ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค apt ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ถ”๊ฐ€

echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

4. apt ์—…๋ฐ์ดํŠธ

sudo apt-get update

5. kubelet, kubeadm, kubectl ์„ค์น˜

sudo apt-get install -y kubelet kubeadm kubectl

6. ๋ฒ„์ „๊ณ ์ •

sudo apt-mark hold kubelet kubeadm kubectl

7. ๋„์ปค ๋ฐ๋ชฌ์˜ ๋“œ๋ผ์ด๋ฒ„ ๊ต์ฒด

cat <<EOF | sudo tee /etc/docker/daemon.json
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF

8. ๋„์ปค ๋ฐ๋ชฌ ์žฌ์‹คํ–‰

sudo systemctl enable docker

sudo systemctl daemon-reload

sudo systemctl restart docker

# kubelet๊ฐ€ ์‹คํ–‰์ธ์ง€ ํ™•์ธ
sudo systemctl status kubelet
# ์‹คํ–‰์ค‘์ด ์•„๋‹ ๊ฒฝ์šฐ
sudo systemctl start kubelet

9. ํด๋Ÿฌ์Šคํ„ฐ ์ดˆ๊ธฐํ™”

sudo kubeadm init --pod-network-cidr=10.244.0.0/16

10. ํด๋Ÿฌ์Šคํ„ฐ ๋ฆฌ์…‹ (์—๋Ÿฌ๋ฐœ์ƒ์‹œ ์ดˆ๊ธฐํ™” ๐Ÿคฎ)

sudo kubeadm reset
rm -rf $HOME/.kube/config

11. ์กฐ์ธ๋ช…๋ น์–ด๋ฅผ ๋ณต์‚ฌํ•ด๋‘”๋‹ค. (๋…ธ๋“œ๋ฅผ ์—ฐ๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด)

kubeadm join 172.31.14.147:6443 --token wza8ug.yfe906i22cih2dlb \
	--discovery-token-ca-cert-hash sha256:13244b42705b1bbc4fcb445cf39f2792bd05abfe31aacb520da5337aa8b9679a

12. kubectl ์‚ฌ์šฉ์„ค์ •

mkdir -p $HOME/.kube

sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

sudo chown $(id -u):$(id -g) $HOME/.kube/config

13. kubectl ๋™์ž‘ํ™•์ธ

kubectl get namespace

14. ๋งˆ์Šคํ„ฐ ์žฌํ•œ ์ œ๊ฑฐ

kubectl taint nodes --all node-role.kubernetes.io/master-

๐Ÿ“Œ CNI

  • ๋„คํŠธ์›Œํฌ ํ”Œ๋Ÿฌ๊ทธ์ธ
  • ๋งˆ์Šคํ„ฐ์™€ ๋…ธ๋“œ๋“ค ๊ฐ„ ๋„คํŠธ์›Œํ‚น์— ๋Œ€ํ•œ ์„ค์ •

๐Ÿ“Œ coredns

  • ๊ฐ™์€ ๋…ธ๋“œ ํ˜น์€ ๋‹ค๋ฅธ ๋…ธ๋“œ์˜ Pod ๊ฐ„ ํ†ต์‹ ์„ ์œ„ํ•ด ๋„๋ฉ”์ธ์„ ์ œ๊ณต
  • coredns์˜ ์ƒํƒœ๊ฐ€ Pedning ์ธ ๊ฒฝ์šฐ CNI๋ฅผ ์„ค์น˜ํ•œ๋‹ค?
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

๐Ÿ“Œ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๋…ธ๋“œ ์ƒ์„ฑ

1. EC2 ์ƒ์„ฑ t3.small

2. ์ธ๋ฐ”์šด๋“œ ์„ค์ •

TCP 10250 โžก๏ธ kubelet API
TCP 30000-32767 โžก๏ธ NodePort
UDP 8472 โžก๏ธ CNI๊ด€๋ จ
UDP 8285 โžก๏ธ CNI๊ด€๋ จ

3. ๋…ธ๋“œ์—๋„ ๋งˆ์Šคํ„ฐ์™€ ๋™์ผํ•˜๊ฒŒ ๋„์ปค ์„ค์น˜

4. ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ์„ค์น˜ (ํด๋Ÿฌ์Šคํ„ฐ ์ดˆ๊ธฐํ™” ์ „๊นŒ์ง€๋งŒ ์„ค์ •)

5. ๋งˆ์Šคํ„ฐ ์ƒ์„ฑ์‹œ ๋ณต์‚ฌํ•œ join ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ (sudo๋กœ ์‹คํ–‰)

sudo kubeadm join 172.31.14.147:6443 --token wza8ug.yfe906i22cih2dlb \
	--discovery-token-ca-cert-hash sha256:13244b42705b1bbc4fcb445cf39f2792bd05abfe31aacb520da5337aa8b9679a

6. ๋งˆ์Šคํ„ฐ์—์„œ ๋…ธ๋“œ๊ฐ€ ์ž˜ ์—ฐ๊ฒฐ๋˜์—ˆ๋Š” ์ง€ ํ™•์ธ

kubectl get nodes

๐Ÿ“Œ Pod

  • 1๊ฐœ ์ด์ƒ์˜ ์ปจํ…Œ์ด๋„ˆ๋กœ ๊ตฌ์„ฑ๋œ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ๋Š” ์ตœ์†Œ ๋‹จ์œ„์ด๋‹ค.
    • ๋™์ผํ•œ Pod์— ์†ํ•œ ์ปจํ…Œ์ด๋„ˆ ๊ฐ„์—๋Š” ์„œ๋กœ ์Šคํ† ๋ฆฌ์ง€์™€ ๋„คํŠธ์›Œํฌ๋ฅผ ๊ณต์œ ํ•œ๋‹ค.
  • Pod๋Š” ๊ณ ์œ ํ•œ IP๋ฅผ ๊ฐ€์ง„๋‹ค. (Pod๋งˆ๋‹ค IP๊ฐ€ ๋ถ€์—ฌ)
  • ํ•œ ๊ฐœ ๋…ธ๋“œ์— ์—ฌ๋Ÿฌ ๊ฐœ Pod๋ฅผ ๋ฐฐ์น˜ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • ํ•œ ๊ฐœ Pod์—๋Š”์„œ ํ•œ ๊ฐœ ์ด์ƒ์˜ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๊ตฌ๋™์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค.

ํŒŒ๋“œ์ƒ์„ฑ

1. ํŒŒ๋“œ ์ƒ์„ฑ์„ ์œ„ํ•œ ์„ค์ •ํŒŒ์ผ ์ƒ์„ฑ

vi my-flask-pod.yaml

2. Pod ์ƒ์„ฑ์„ ์œ„ํ•œ yml ํŒŒ์ผ์ž‘์„ฑ

apiVersion: v1
kind: Pod
metadata:
  labels: 
    app: ํŒŒ๋“œ์ด๋ฆ„
spec:
  containers: # ์—ฌ๋Ÿฌ ๊ฐœ ์ปจํ…Œ์ด๋„ˆ ์„ค์ •๊ฐ€๋Šฅ
  - name: ์ปจํ…Œ์ด๋„ˆ ์ด๋ฆ„
    image: ๋„์ปคํ—ˆ๋ธŒ์—์„œ ๊ฐ€์ ธ์˜ฌ ์ด๋ฏธ์ง€
    ports:
    - containerPort: 5000

3. Pod ์ƒ์„ฑ (์ปจํ…Œ์ด๋„ˆ ๊ตฌ๋™)

kubectl apply -f ํŒŒ๋“œ์„ค์ •ํŒŒ์ผ_์ด๋ฆ„

[ ์ƒ์„ฑ๋œ Pod ํ™•์ธ -f: ํŒŒ์ผ๋ช… ]
kubectl get -f ํŒŒ๋“œ์„ค์ •ํŒŒ์ผ_์ด๋ฆ„

[ Pod ์ƒ์„ธ์ •๋ณด ]
kubectl describe -f ํŒŒ๋“œ์„ค์ •ํŒŒ์ผ_์ด๋ฆ„

[ Pod ๋กœ๊ทธํ™•์ธ ]
kubectl logs -f ํŒŒ๋“œ์„ค์ •ํŒŒ์ผ_์ด๋ฆ„

[ Pod ์‚ญ์ œ ]
kubectl delete -f ํŒŒ๋“œ์„ค์ •ํŒŒ์ผ_์ด๋ฆ„

4. ์™ธ๋ถ€์—์„œ Pod์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค์ • โžก๏ธ Service


๐Ÿ“Œ Service

  • ์•ž ๋‹จ์—์„œ ์™ธ๋ถ€์š”์ฒญ์„ ๋ฐ›์•„ Pod์™€ ์—ฐ๊ฒฐํ•ด์ค€๋‹ค
  • Pod์˜ DNS์—ญํ• 

1. ์„œ๋น„์Šค ์ƒ์„ฑ์„ ์œ„ํ•œ yml ํŒŒ์ผ์ž‘์„ฑ

vi my-flask-svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: ์„œ๋น„์Šค_์ด๋ฆ„
spec:
  selector: # ์—ฐ๊ฒฐํ•  pod์˜ ์ด๋ฆ„ (labels)
    app: ํŒŒ๋“œ_์ด๋ฆ„
  ports:
    - protocol: TCP
      port: 5000
      targetPort: 5000
  type: NodePort

2. ์„œ๋น„์Šค ์ƒ์„ฑ (์™ธ๋ถ€ ์ ‘๊ทผํฌํŠธ(NodePort) ํ™•์ธ)

kubectl apply -f my-flask-svc.yaml

kubectl get -f my-flask-svc.yaml
  • 30000-32767 ์‚ฌ์ด์˜ ํฌํŠธ๊ฐ€ ๋žœ๋คํ•˜๊ฒŒ ํ• ๋‹น๋œ๋‹ค. (NodePort)
    • ๋…ธ๋“œ์ชฝ ์ธ๋ฐ”์šด๋“œ๋ฅผ 30000-32767์œผ๋กœ ์—ด์–ด๋‘” ์ด์œ 
    • NodePort: ์™ธ๋ถ€์—์„œ ์ ‘๊ทผ๊ฐ€๋Šฅํ•œ ํฌํŠธ
  • ์™ธ๋ถ€์—์„œ node ์ธ์Šคํ„ด์Šค์˜ ip์™€ ํ• ๋‹น๋œ ํฌํŠธ๋กœ ์ ‘๊ทผ๊ฐ€๋Šฅํ•˜๋‹ค.
  • ์ผ๋‹จ ๋ฐฐํฌ๋Š” ๋๋‹ค.

but ์•„์ง ๋ฌธ์ œ๊ฐ€ ์žˆ๋‹ค.

  • ์–ด๋–ค ๋ฌธ์ œ๋กœ ์ธํ•ด์„œ Service๊ฐ€ ๋‹ค์‹œ ์ƒ์„ฑ๋˜๋ฉด NodePort๊ฐ€ ๋ณ€๊ฒฝ๋œ๋‹ค.
    • ์ด API๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ชจ๋“  ๊ณณ์˜ ์ฝ”๋“œ๋ฅผ ๋ณ€๊ฒฝํ•ด์•ผ ํ•  ์ˆ˜๋„ ์žˆ๋‹ค.
  • ํฌํŠธ๋ฅผ ๊ณ ์ •์‹œ์ผœ๋ณด์ž.

๐Ÿ“Œ Ingress

  • like nginx
  • ์™ธ๋ถ€์—์„œ ์„œ๋น„์Šค์— ๋Œ€ํ•œ ์ ‘๊ทผ์„ ๊ด€๋ฆฌํ•œ๋‹ค.
  • ํฌํŠธ๊ฐ€ ์•„๋‹Œ ์„œ๋น„์Šค์˜ ์ด๋ฆ„์œผ๋กœ ์„œ๋น„์Šค๋ฅผ ์‹๋ณ„ํ•  ์ˆ˜ ์žˆ๋‹ค. (ํฌํŠธ๊ฐ€ ๋ณ€๊ฒฝ๋˜๋„ ์—”๋“œํฌ์ธํŠธ๋Š” ๊ฐ™๋‹ค.)

0. ์ธ๊ทธ๋ ˆ์Šค ์ปจํŠธ๋กค๋Ÿฌ ์„ค์น˜ (ingress-nginx)

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.4/deploy/static/provider/baremetal/deploy.yaml

[ ์ธ๊ทธ๋ ˆ์Šค ์„ค์น˜ ํ™•์ธ ]
kubectl get namespaces

[ ์ตœ์‹ ๋ฒ„์ „ ์˜ค๋ฅ˜์‚ญ์ œ ]
kubectl delete validatingwebhookconfiguration ingress-nginx-admission

1. ์ธ๊ทธ๋ ˆ์Šค ์„ค์ •ํŒŒ์ผ ์ž‘์„ฑ

vi micro-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: micro-ingres
  annotations: # nginx ํ˜•ํƒœ๋กœ ingress๋ฅผ ์ƒ์„ฑ?
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: my-flask.bar.com # ์™ธ๋ถ€์—์„œ ์ ‘๊ทผํ•  ๋„๋ฉ”์ธ
    http:
      paths:
      - pathType: Prefix
        path: /
        backend:
          service:
            name: my-flask-svc # ์„œ๋น„์Šค์˜ ์ด๋ฆ„์œผ๋กœ ์‹๋ณ„
            port:
              number: 5000

2. ์„ค์ •ํŒŒ์ผ ์ ์šฉ (ํฌํŠธํ™•์ธ)

kubectl apply -f micro-ingress.yaml

# ingress-controller ํฌํŠธ ํ™•์ธ
kubectl get all -n ingress-nginx 

# ingress-controller ๋„๋ฉ”์ธ ํ™•์ธ
kubectl describe -f micro-ingress.yaml

3. ingress์˜ ๋„๋ฉ”์ธ๊ณผ ํฌํŠธ๋กœ ์ ‘๊ทผํ•œ๋‹ค.

4. ๋กœ์ปฌ์˜ ํ˜ธ์ŠคํŠธํŒŒ์ผ ๋ณ€๊ฒฝ (๋กœ์ปฌ์—์„œ ์ ‘๊ทผ ํ…Œ์ŠคํŠธ)

sudo vi /etc/hosts

node์ธ์Šคํ„ด์Šคip ์ธ๊ทธ๋ ˆ์Šค_๋„๋ฉ”์ธ

๐Ÿ“Œ ELB, ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ์—ฐ๋™

ELB ์ƒ์„ฑ

  1. ๋กœ๋“œ๋ฐธ๋žœ์„œ ์ƒ์„ฑ

  2. ์ธ๋ฐ”์šด๋“œ: ๋ชจ๋“  TCP

  3. ๋„คํŠธ์›Œํฌ ์„ค์ • (๊ธฐ๋ณธ ์„œ๋ธŒ๋„ท 4๊ฐœ ๋ชจ๋‘ ์„ค์ •)

  4. ํƒ€๊ฒŸ๊ทธ๋ฃน ์ƒ์„ฑ

  • instance
  • group name: kuber-target
  • HTTP : IngressPort (HTTP:30969)
    ELB๋กœ ์™ธ๋ถ€์—์„œ 80 ํฌํŠธ๋กœ ์š”์ฒญ์ด ์™”์„ ๋•Œ ์ด ์š”์ฒญ์„ EC2๋กœ ๋„˜๊ธธ ๋•Œ Ingress ํฌํŠธ๋ฅผ ํ˜ธ์ถœํ•˜๋„๋ก ์„ค์ •
  • Health check path: /healthz
  1. ๋…ธ๋“œ ์ธ์Šคํ„ด์Šค๋ฅผ ํƒ€๊ฒŸ๊ทธ๋ฃน์— ์ถ”๊ฐ€

  2. ์ƒ์„ฑํ•œ ํƒ€๊ฒŸ๊ทธ๋ฃน์„ ELB์— ์„ค์ •

  3. ํƒ€๊ฒŸ๊ทธ๋ฃน, ELB ์ƒํƒœํ™•์ธ

  4. ELB๊ฐ€ ํ™œ์„ฑํ™› ๋๋‹ค๋ฉด ์—”๋“œํฌ์ธํŠธ๋กœ ์ ‘๊ทผ. (404 ์—๋Ÿฌ๋ฐœ์ƒ)

  • Ingress ์„ค์ •์‹œ ๋„๋ฉ”์ธ์„ ์„ค์ •ํ•ด์ฃผ์—ˆ๋Š”๋ฐ ํ˜„์žฌ ELB์˜ ์—”๋“œํฌ์ธํŠธ๋กœ ์ ‘๊ทผํ–ˆ๊ธฐ ๋•Œ๋ฌธ
  • Ingress์˜ ๋„๋ฉ”์ธ์„ ELB์˜ ์—”๋“œํฌ์ธํŠธ๋กœ ๋ณ€๊ฒฝํ•˜๋“  Route53 ๋„๋ฉ”์ธ์„ ์‚ฌ์šฉํ•˜๋“  ๋ฐ”๊ฟ”์ค˜์•ผ ํ•œ๋‹ค.
  1. Ingress ์„ค์ •ํŒŒ์ผ ์ˆ˜์ • (๋„๋ฉ”์ธ ์ˆ˜์ •)
vi micro-ingress.yaml
  1. Route53์˜ CNAME๋ ˆ์ฝ”๋“œ url์„ host์— ๊ทธ๋Œ€๋กœ ๋„ฃ์–ด์ค€๋‹ค.


์ผ๋‹จ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๊ฐ€ ์–ด๋–ค๊ฑด์ง€ ํ•œ 2.5%์ •๋„ ์•Œ ๊ฒƒ ๊ฐ™๋‹ค.
์ด๋ฒˆ ๊ธฐํšŒ์— ๋„คํŠธ์›Œํฌ CS ๊ณต๋ถ€๋ฅผ ์กฐ๊ธˆ์”ฉ ํ•ด๋ด์•ผ๊ฒ ๋‹ค.

profile
์ข€ ๋” ์ฒœ์ฒœํžˆ ๊นŒ๋จน๊ธฐ ์œ„ํ•ด ๊ธฐ๋กํ•ฉ๋‹ˆ๋‹ค. ๐Ÿง

0๊ฐœ์˜ ๋Œ“๊ธ€