kkumtree

VSCode DevContainer - CI/CD ์Šคํ„ฐ๋”” 1์ฃผ์ฐจ

  • kkumtree

2025-10-19T20:50:46+09:00

ํ•œ๊ฐ€์œ„ ์—ฐํœด์˜ ๋๊ณผ ํ•จ๊ป˜, CloudNet@์—์„œ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋Š” CI/CD Study์— ์ฐธ์—ฌํ•˜๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

์ด๋ฒˆ์—๋Š” ํ•ธ์ฆˆ์˜จ์šฉ์œผ๋กœ ์ฆ๊ฒจ์“ฐ๋Š” GitHub CodeSpace์™€ ์—ฐ๊ด€๋œ,
Visual Studio ์ƒ์—์„œ์˜ Dev Containers ํ™œ์šฉ์— ๋Œ€ํ•ด ๋‹ค๋ค„๋ณด๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค.

์‚ฌ์šฉ OSํ™˜๊ฒฝ์€ Ubuntu Desktop 24.04 LTS ์ด๋ฉฐ,
์•„๋ž˜์˜ ๋ฌธ์„œ์—์„œ ์•ˆ๋‚ด๋œ๋Œ€๋กœ ์ฐจ๊ทผ์ฐจ๊ทผ ๋”ฐ๋ผํ•ด๋ณด๋ฉฐ ์ข€ ๋” ์ดํ•ด๋ฅผ ํ•ด๋ณด๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค.

Developing inside a Container

0. Docker ์„ค์น˜

๋‚ด์šฉ์ด ๊ธธ์–ด, ์•„๋ž˜์˜ ํฌ์ŠคํŠธ๋กœ ๋‚˜๋ˆ„์—ˆ์Šต๋‹ˆ๋‹ค.

  • Ubuntu Docker ์„ค์น˜
  • ์ž‘์„ฑ ๊ธฐ์ค€, Dev Container๋Š” Ubuntu Snap ํŒจํ‚ค์ง€(snapcraft)๋กœ ์„ค์น˜๋œ Docker์—๋Š” ์ง€์›๋˜์ง€ ์•Š๋Š”๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.
  • ์‚ฌ์šฉ์ž($USER)๋ฅผ docker ๊ทธ๋ฃน์— ์ถ”๊ฐ€ํ•˜์—ฌ์•ผํ•ฉ๋‹ˆ๋‹ค.
    (์œ„ ๊ฒŒ์‹œ๋ฌผ์˜ 3. ๊ถŒํ•œ ์ƒ์Šน ์„ค์ • (์„ ํƒ) ์ฐธ๊ณ )

1. Dev Containers ํ™•์žฅ ํ”„๋กœ๊ทธ๋žจ

Visual Studio Code(์ดํ•˜, VSCode)์—์„œ ์ œ๊ณต๋˜๋Š”, Dev Containers ํ™•์žฅ ํ”„๋กœ๊ทธ๋žจ์„ ์‚ฌ์šฉํ•˜๋ฉด, ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์— ํ•„์š”ํ•œ ๋ชจ๋“  ๊ธฐ๋Šฅ์ด ๊ฐ–์ถฐ์ง„ Container๋ฅผ ๊ตฌ์ถ•ํ•˜์—ฌ ํ™˜๊ฒฝ์„ ๊ตฌ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Ubuntu Docker ์„ค์น˜

  • kkumtree

2025-10-17T20:53:27+09:00

Docker ์‚ฌ์šฉ์„ ์œ„ํ•œ ๊ธฐ๋ณธ์ ์ธ ์„ค์น˜ ๋ฐฉ๋ฒ• ๋ฉ”๋ชจ

0. ์ด์ „ ๋ฒ„์ „ ์ œ๊ฑฐ (์„ ํƒ)

  • ์ง„ํ–‰ ์ค‘์ธ Docker ๊ด€๋ จ ์ž‘์—…์ด ์—†์–ด, prune ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ๊ธฐ์กด Docker์˜ ๋ฆฌ์†Œ์Šค๋“ค์„ ์‚ญ์ œ ์ง„ํ–‰ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
docker system prune -a

docker system prune -a

  • ๊ณต์‹ ๋ฌธ์„œ์— ๋”ฐ๋ผ, ์•„๋ž˜ ์ปค๋งจ๋“œ๋กœ ์‚ญ์ œ๋ฅผ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค. (๊ฒธ์‚ฌ๊ฒธ์‚ฌ autoremove๋„ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.)
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
sudo apt-get autoremove
# โฏ for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
# [sudo] password for kkumtree: 
# Reading package lists... Done
# Building dependency tree... Done
# Reading state information... Done
# The following packages were automatically installed and are no longer required:
#   bridge-utils containerd pigz runc ubuntu-fan
# Use 'sudo apt autoremove' to remove them.
# The following packages will be REMOVED:
#   docker.io
# 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
# After this operation, 126 MB disk space will be freed.
# Do you want to continue? [Y/n] Y
# (Reading database ... 465886 files and directories currently installed.)
# Removing docker.io (27.5.1-0ubuntu3~24.04.2) ...
# '/usr/share/docker.io/contrib/nuke-graph-directory.sh' -> '/var/lib/docker/nuke-graph-directory.sh'
# Stopping 'docker.service', but its triggering units are still active:
# docker.socket
# Processing triggers for man-db (2.12.0-4build2) ...
# (...)
# Removing containerd (1.7.28-0ubuntu1~24.04.1) ...
# Processing triggers for man-db (2.12.0-4build2) ...
# Reading package lists... Done
# Building dependency tree... Done
# Reading state information... Done
# The following packages were automatically installed and are no longer required:
#   bridge-utils pigz ubuntu-fan
# Use 'sudo apt autoremove' to remove them.
# The following packages will be REMOVED:
#   runc
# 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
# After this operation, 34.3 MB disk space will be freed.
# Do you want to continue? [Y/n] Y
# (Reading database ... 465640 files and directories currently installed.)
# Removing runc (1.3.0-0ubuntu2~24.04.1) ...
# Processing triggers for man-db (2.12.0-4build2) ...
# โฏ sudo apt-get autoremove
# Reading package lists... Done
# Building dependency tree... Done
# Reading state information... Done
# The following packages will be REMOVED:
#   bridge-utils pigz ubuntu-fan
# 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
# After this operation, 421 kB disk space will be freed.
# Do you want to continue? [Y/n] Y
# (Reading database ... 465612 files and directories currently installed.)
# Removing ubuntu-fan (0.12.16+24.04.1) ...
# ubuntu-fan: removing default /etc/network/fan configuration
# Removing bridge-utils (1.7.1-1ubuntu2) ...
# Removing pigz (2.8-1) ...
# Processing triggers for man-db (2.12.0-4build2) ...

1. Docker ๊ณต์‹ GPG key์™€ APT ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ถ”๊ฐ€

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

alt text

How to manage Microsoft packages with APT manager

  • kkumtree

2025-03-02T22:31:49+09:00

Microsoft gave us a lot of programs as Ubuntu/Debian packages.

In this post, I will show you how to manage Edge and VSCode packages with APT package manager.

APT is stands for Advanced Package Tool.

Why?

Simple. I want to upgrade them easily with APT package manager rather than using dpkg command.

sudo apt-get update -y && sudo apt-get upgrade -y  

When I installed Microsoft Edge and Visual Studio Code, I used dpkg command. But, It is little burdensome to manage packages with dpkg command in Update/Upgrade.

Ubuntu์— OBS Studio ์„ค์น˜ํ•˜๊ธฐ

  • kkumtree

2024-11-11T20:59:03+09:00

๋ญ”๊ฐ€ ๋‚ด๊ฐ€ ์•Œ๋ ค์ค˜์•ผํ•˜๋Š”๋ฐ, ๊ธ€๋กœ ์“ฐ๊ธฐ ์‹ซ์€ ๊ทธ๋Ÿฐ ๋‚ ์ด ์žˆ๋‹ค.

๊ทธ๋ž˜์„œ ์žˆ๋Š” OBS Studio.

Ubuntu๋„ 22.04 LTS (Jammy Jellyfish) ์ดํ›„๋ถ€ํ„ฐ๋Š” OBS Studio๋ฅผ APT repository๋ฅผ ํ†ตํ•ด ์„ค์น˜๋ฅผ ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•˜์—ฌ, ๋„์ „.

sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt install ffmpeg obs-studio

์ƒ๊ฐ๋ณด๋‹ค ์˜ค๋ž˜ ๊ฑธ๋ฆฐ๋‹ค.

sudo add-apt-repository ppa:obsproject/obs-studio
# [sudo] password for kkumtree: 
# Repository: 'Types: deb
# URIs: https://ppa.launchpadcontent.net/obsproject/obs-studio/ubuntu/
# Suites: noble
# Components: main
# '
# Description:
# Latest stable release of OBS Studio
# More info: https://launchpad.net/~obsproject/+archive/ubuntu/obs-studio
# Adding repository.
# Press [ENTER] to continue or Ctrl-c to cancel.
# Hit:1 https://packages.microsoft.com/repos/edge stable InRelease
# Hit:3 https://baltocdn.com/helm/stable/debian all InRelease                    
# Hit:2 https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.31/deb  InRelease
# Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease               
# Hit:5 https://ppa.launchpadcontent.net/graphics-drivers/ppa/ubuntu noble InRelease
# Hit:6 https://esm.ubuntu.com/apps/ubuntu noble-apps-security InRelease         
# Hit:7 https://esm.ubuntu.com/apps/ubuntu noble-apps-updates InRelease          
# Hit:8 https://esm.ubuntu.com/infra/ubuntu noble-infra-security InRelease       
# Get:9 https://ppa.launchpadcontent.net/obsproject/obs-studio/ubuntu noble InRelease [17.8 kB]
# Hit:10 https://esm.ubuntu.com/infra/ubuntu noble-infra-updates InRelease       
# Get:11 https://ppa.launchpadcontent.net/obsproject/obs-studio/ubuntu noble/main amd64 Packages [1,168 B]
# Get:12 https://ppa.launchpadcontent.net/obsproject/obs-studio/ubuntu noble/main Translation-en [160 B]
# Hit:13 http://kr.archive.ubuntu.com/ubuntu noble InRelease                     
# Hit:14 http://kr.archive.ubuntu.com/ubuntu noble-updates InRelease
# Hit:15 http://kr.archive.ubuntu.com/ubuntu noble-backports InRelease
# Fetched 19.1 kB in 3s (6,126 B/s)
# Reading package lists... Done

์ด๋ฏธ ์—…๋ฐ์ดํŠธ๊ฐ€ ๋œ ๋А๋‚Œ์ด๊ธด ํ•œ๋ฐ, ํ•œ๋ฒˆ ๋” ํ•˜๋ผ๋‹ˆ๊นŒ ํ•ฉ๋‹ˆ๋‹ค.

The following signatures were invalid: EXPKEYSIG

  • kkumtree

2024-11-04T21:24:49+09:00

๋งค๋ฒˆ ์ˆ˜์ •ํ•˜๊ธฐ ๊ท€์ฐฎ์•„์„œ, ๋‚˜์ค‘์— ์ฐพ์•„์„œ ์“ฐ๋ ค๊ณ  ๋„์ ์ด๋Š” ๋ฉ”๋ชจ
๋ณดํ†ต GPGํ‚ค ์ง€์šฐ๊ณ  ๋‹ค์‹œ ๋ฐ›์œผ๋ฉด ๋œ๋‹ค.

๊ทธ๋Ÿฐ ๋‚ ์ด ์žˆ๋‹ค. ๋ฌด์‹ฌ๊ฒฐ์— sudo apt-get update๋ฅผ ์‹คํ–‰ํ•˜๋Š” ์ˆœ๊ฐ„, ์—๋Ÿฌ๊ฐ€ ๋œจ๋Š” ๋‚ .

expkeysig

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.31/deb  InRelease: The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project <isv:[email protected]>
W: Failed to fetch https://pkgs.k8s.io/core:/stable:/v1.31/deb/InRelease  The following signatures were invalid: EXPKEYSIG 234654DA9A296436 isv:kubernetes OBS Project <isv:[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.

Zorin OS๋กœ ์ฒ˜์Œ ์ž…๋ฌธํ•  ๋•Œ๋Š” ์ด๊ฑฐ ๋งˆ์ฃผ์น˜๋ฉด ๋ฒ„ํ‹ฐ๋‹ค ๋ฒ„ํ‹ฐ๋‹ค ํฌ๋งทํ–ˆ๋Š”๋ฐ, ์ด์ œ๋Š” ๋ญ… ์–ด๋””์„œ ํ‚ค ๋งŒ๋ฃŒ๋๋‚˜๋ณด๋‹ค ํ•˜๊ณ  ๊ทธ๋ ค๋ ค๋‹ˆ ํ•œ๋‹ค. =ใ……=);

SAML for using Amazon Managed Grafana Workspace (To-Do)

  • kkumtree

2024-11-02T21:43:00+09:00

Organization์˜ ์ด์Šˆ๊ฐ€ ์žˆ์–ด Amazon Managed Grafana Workspace๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด SAML ์ธ์ฆ์„ ๊ตฌ์„ฑํ•ด์•ผํ•˜๋Š”๋ฐ, SAML ์ธ์ฆ ์ œ์–ด๊ฐ€ ๋˜๋ฉด ๊ฒ€ํ† ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

๋‹น์—ฐํžˆ ๊ฑฐ์˜ 4๋…„์ด ๋‹ค๋˜๊ฐ€๋‹ˆ Amazon Managed Grafana โ€“ Getting Started์™€๋Š” ๋‹ค๋ฅธ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

ํ˜„์žฌ ์ œ ๊ถŒํ•œ์œผ๋กœ๋Š” Organization์„ ์ƒ์„ฑํ•  ์ˆ˜ ์—†์–ด์„œ, Workspace๋งŒ ์ƒ์„ฑํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค.
์ฆ‰, ๋งค์šฐ ๋А์Šจํ•œ ๊ถŒํ•œ์œผ๋กœ Workspace๋ฅผ ๋งŒ๋“ค์–ด์ฃผ๊ฒ ๋‹ค ์ด๊ฒƒ์ž…๋‹ˆ๋‹ค.

1. ‘๋”ธ๊น’์œผ๋กœ ์‹œ์ž‘ํ•˜๊ธฐ

  • Getting Started with ๋”ธ๊น

amg-workspace

  • ์ด๋ฆ„๋งŒ ์ง“๊ณ , ๋„˜์–ด๊ฐ€ ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

step1-ws-name

Monitoring CoreDNS in EKS with Grafana Cloud

  • kkumtree

2024-10-30T23:44:01+09:00

Grafana Cloud ์ฒซ ์‚ฌ์šฉ๊ธฐ

CloudNet@์—์„œ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋Š” K8s Advanced Network Study(์ดํ•˜, KANS)๋ฅผ ํ†ตํ•ด ํ•™์Šตํ•œ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

์ด๋ฒˆ ์ฃผ์ฐจ๋Š” ์‹ค๊ฐ์ด ์•„์ง ์•ˆ๋‚˜๋Š”๋ฐ, ์Šคํ„ฐ๋”” ๋งˆ์ง€๋ง‰ ์ฃผ์ฐจ์ž…๋‹ˆ๋‹ค.
๊ทธ๋ž˜์„œ ์—ฌ๋Ÿฌ๋ถ„์ด ์ž˜ ์•Œ๊ณ , ๋งค์šฐ ์ข‹์•„ํ•˜๋Š” EKS๋ฅผ ํ†ตํ•ด, CoreDNS ์ด์Šˆ๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋Š” Hands-on์„ ์ฐจ๊ทผ์ฐจ๊ทผ ๋”ฐ๋ผํ•ด๋ณด๋ ค๊ณ ํ•ฉ๋‹ˆ๋‹ค.

์œ„์˜ Blog๋ฅผ ๊ทธ๋Œ€๋กœ ๋”ฐ๋ผํ•ด๋ณผ ๊ฒ๋‹ˆ๋‹ค.

0. EKS Cluster ์ƒ์„ฑ

์Šคํ„ฐ๋””์—์„œ ์ œ๊ณต๋œ CloudFormation์„ ํ†ตํ•ด EKS Cluster๋ฅผ ์ƒ์„ฑํ•ด๋ณผ๊นŒํ•ฉ๋‹ˆ๋‹ค.
eksctl์ด ์–ธ๊ธ‰๋˜์–ด ์žˆ์–ด์„œ ์™ ์ง€… ๋‚˜์ค‘์— ๋กค๋ฐฑํ•˜๊ณ  ํƒœ์ดˆ๋งˆ์„๋ถ€ํ„ฐ eksctl ๊ธฐ๋ฐ˜ CloudFormation ๋ฐฐํฌ๋ฅผ ํ•  ๊ฒƒ ๊ฐ™์€ ๋ถˆ์•ˆํ•จ์ด ์žˆ์ง€๋งŒ ํ•ด๋ณด์ฃ (?).

Kubernetes Service(5): Cillium Quick-start w/Hubble UI

  • kkumtree

2024-10-26T01:35:59+09:00

๊ทธ๋Ÿผ ๋งค๋ฒˆ ์‹คํŒจ๋งŒ ํ–ˆ๋˜ Cilium ๋ฐฐํฌ๋ฅผ ํ•œ๋ฒˆ ํ•ด๋ณผ๊นŒ์š”?

CloudNet@์—์„œ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋Š” K8s Advanced Network Study(์ดํ•˜, KANS)๋ฅผ ํ†ตํ•ด ํ•™์Šตํ•œ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

1. CSP VM ๊ณจ๋ผ๋ณด๊ธฐ

์ด๋ ‡๊ฒŒ ์“ด ์ด์œ ๋Š” ๊ฒฐ๊ตญ ๋„คํŠธ์›Œํฌ๋ฅผ ์ž˜ ์•Œ์•„์•ผํ•˜๋Š”๋ฐ,
์ž‘๋…„์— ํ•  ๋•Œ๋Š” ๊ทธ๋Ÿฐ๊ฑฐ ์ƒ๊ฐ๋„ ์•ˆํ•˜๊ณ  ๊ทธ๋ƒฅ ์˜ฌ๋ ค๋ณด๋ ค ํ–ˆ์œผ๋‹ˆ ๋‹น์—ฐํžˆ ์•ˆ ๋Œ์•„๊ฐ€๊ฒ ์ฃ ?

๊ทธ๋ƒฅ ๊ณฐ๊ณฐํžˆ ์˜ค๋ฆฌduckduckgo๋ž‘ ํˆฌ๋‹ฅ๊ฑฐ๋ฆฌ๋‹ค๋ณด๋‹ˆ, ๋น„๋ก ์—ฐ์‹์ด ๋˜๊ธด ํ–ˆ์ง€๋งŒ
ํด๋ฆญ์„ ์•ˆํ•˜๊ณ ๋Š” ๋ชป๋ฐฐ๊ธธ ์œ„์˜ ๋ธ”๋กœ๊ทธ ์ œ๋ชฉ์ด ๋ˆˆ์— ๋„์˜€์Šต๋‹ˆ๋‹ค.

Why eBPF?

  • kkumtree

2024-10-21T19:47:33+09:00

๊ณ ์ณ์•ผํ•  ๋ถ€๋ถ„์ด ๋„ˆ๋ฌด ๋งŽ์•„์„œ ๋‚˜์ค‘์— ํ•ด๋‹น ๋ถ€๋ถ„๋งŒ ๊ธ€์„ ์ž‘์„ฑํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค.

์–ด๋А๋ง ์ด๋ฒˆ ์Šคํ„ฐ๋””๋„ ๋Œ€๋ง์˜ Cilium์„ ๋‹ค๋ฃจ๊ธฐ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.
Cilium์— ์ด๋ ‡๊ฒŒ๋„ (์ €๋ฅผ ํฌํ•จํ•œ) ๋ชจ?๋‘๊ฐ€ ์—ด๊ด‘ํ•˜๋Š”์ง€ ์•Œ์•„๋ณด๊ธฐ ์ „์—
๊ทผ๊ฐ„์ด ๋˜๋Š” eBPF๋ฅผ ๋จผ์ € ๊ฐ€๋ณ๊ฒŒ ์•Œ์•„๋ณด๊ณ  ๊ฐ€๋ คํ•ฉ๋‹ˆ๋‹ค.
์ด ๋•Œ๋Š” ์„ค๋งˆ ํ–ˆ์ง€๋งŒ, ์—ญ์‹œ๋‚˜ ์Šค๋ถˆ์žฌ ์—”๋”ฉ์ด์—ˆ๋‹ค

CloudNet@์—์„œ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋Š” K8s Advanced Network Study(์ดํ•˜, KANS)๋ฅผ ํ†ตํ•ด ํ•™์Šตํ•œ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

1. Linux Network Stack

์Šคํ„ฐ๋”” 1์ฃผ์ฐจ์˜ Jenkins ์ปจํ…Œ์ด๋„ˆ์—์„œ Host์˜ Docker ๋ฐ๋ชฌ ์‚ฌ์šฉํ•˜๊ธฐ์—์„œ ๊ฐ€๋ณ๊ฒŒ ๋ง›์„ ๋ณด๊ณ  ๋„๋ง์น˜๊ธฐ ๋ฐ”๋นด์ง€๋งŒ, ์—ฌํŠผ ์•„๋ž˜์˜ ์‚ฌํ•ญ์€ ์Šค์ณ์ง€๋‚˜๊ฐ”์Šต๋‹ˆ๋‹ค.

Kubernetes Service(4): envoy config

  • kkumtree

2024-10-19T16:59:16+09:00

์ •์ /๋™์  ์„ค์ •์„ ์•Œ์•„๋ด…๋‹ˆ๋‹ค.
traefik์„ ๋ง›๋ณผ๋•Œ๋Š”, ํ˜ธ๋˜๊ฒŒ ๋ฐ์ธ ๋ถ€๋ถ„์ธ๋ฐ envoy๋Š” ์ƒ๋Œ€์ ์œผ๋กœ ๋ช…๋ฃŒํ–ˆ์Šต๋‹ˆ๋‹ค.

CloudNet@์—์„œ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋Š” K8s Advanced Network Study(์ดํ•˜, KANS)๋ฅผ ํ†ตํ•ด ํ•™์Šตํ•œ ๋‚ด์šฉ์„ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

1. Static Configuration

์•„๋ž˜์™€ ๊ฐ™์ด ๊ตฌ์„ฑ๋ฉ๋‹ˆ๋‹ค.

  • static_resources
    • listeners
    • clusters

(a) static_resources

envoy์˜ ์‹œ์ž‘๊ณผ ํ•จ๊ป˜, ์ •์ ์œผ๋กœ ์„ค์ •๋˜๋Š” ๋ชจ๋“  ๋ฆฌ์†Œ์Šค๋ฅผ ํฌํ•จํ•œ๋‹ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.
์‹ค์ œ๋กœ envoy-demo.yaml ํŒŒ์ผ์„ ์—ด์–ด๋ณด๋ฉด ์ตœ์ƒ๋‹จ์— static_resources์ด ์„ ์–ธ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

static_resources:

  listeners:

(b) listeners

envoy-demo.yaml ํŒŒ์ผ ๊ธฐ์ค€,

  • socket_address: ๋ฆฌ์Šค๋„ˆ๋Š” ํฌํŠธ 10000์—์„œ ์ˆ˜์‹ ํ•˜๋„๋ก ์„ค์ •๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
  • route_config: ๋ชจ๋“  ๊ฒฝ๋กœ์— ๋Œ€ํ•ด service_envoyproxy_io ํด๋Ÿฌ์Šคํ„ฐ๋กœ ๋ผ์šฐํŒ…ํ•ฉ๋‹ˆ๋‹ค.
# cat envoy-demo.yaml | grep -A 30 -B 2 listeners
static_resources:

  listeners:
  - name: listener_0
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 10000
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          stat_prefix: ingress_http
          access_log:
          - name: envoy.access_loggers.stdout
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
          http_filters:
          - name: envoy.filters.http.router
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              routes:
              - match:
                  prefix: "/"
                route:
                  host_rewrite_literal: www.envoyproxy.io
                  cluster: service_envoyproxy_io

(c) clusters

envoy-demo.yaml ํŒŒ์ผ ๊ธฐ์ค€,

  1. <<
  2. <
  3. 1
  4. 2
  5. 3
  6. โ€ฆ
  7. 6
  8. >
  9. >>

kkumtree

Source code on GitHub

ยฉ 2025 kkumtree and contributors All rights reserved.
Licensed under
CC BY-NC-ND 4.0