[k8s] Kubernetes๋ž€?

2023. 7. 13. 06:00ใ†์ด๋ก  ์ •๋ฆฌ

728x90
๋ฐ˜์‘ํ˜•

 





 

์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ์™„๋ฒฝ ๊ฐ€์ด๋“œ:์ž…๋ฌธ๋ถ€ํ„ฐ ์‹ค์ œ ์šด์šฉ๊นŒ์ง€ ํ•„์š”ํ•œ ๊ธฐ์ˆ  ์ด๋ง๋ผ!

COUPANG

www.coupang.com

"์ด ํฌ์ŠคํŒ…์€ ์ฟ ํŒก ํŒŒํŠธ๋„ˆ์Šค ํ™œ๋™์˜ ์ผํ™˜์œผ๋กœ, ์ด์— ๋”ฐ๋ฅธ ์ผ์ •์•ก์˜ ์ˆ˜์ˆ˜๋ฃŒ๋ฅผ ์ œ๊ณต๋ฐ›์Šต๋‹ˆ๋‹ค."

 

 

 

 

 

 

๐Ÿš€ [k8s] Kubernetes

    ๐Ÿ”ฝ ๊ฐœ์š”

        ๐Ÿ“ฆ ์†Œ๊ฐœ

K8s๋Š” Containerํ™”๋œ Workload์™€ Service๋ฅผ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ ์ด์‹์„ฑ์ด ์žˆ๊ณ , ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ์˜คํ”ˆ ์†Œ์Šค ํ”Œ๋žซํผ์„ ์ด์•ผ๊ธฐ ํ•ฉ๋‹ˆ๋‹ค.

k8s๋Š” ์„ ์–ธ์  ๊ตฌ์„ฑ๊ณผ ์ž๋™ํ™”๋ฅผ ๋ชจ๋‘ ์šฉ์ดํ•˜๊ฒŒ ํ•ด์ค€๋‹ค๊ณ  ํ•ด์š”.

k8s์˜ ๋ช…์นญ์€ ํ‚ค์žก์ด(helmsman) ์ฆ‰, ํŒŒ์ผ๋Ÿฟ์„ ๋œป์„ ๊ฐ€์ง„ ๊ทธ๋ฆฌ์Šค์–ด์—์„œ ์œ ๋ž˜ ํ–ˆ๋‹ค๊ณ  ํ•ด์š”.
K8s๋ผ๋Š” ํ‘œ๊ธฐ๋Š” K์™€ s ์‚ฌ์ด์— 8๊ธ€์ž๊ฐ€ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์ด๋ฅผ ์ค„์—ฌ์„œ ํ‘œํ˜„ํ•˜๋Š” ๊ฒƒ์ด์—์š”.

k8s๋Š” Google์ด 2014๋…„ ํ•ด๋‹น ํ”„๋กœ์ ํŠธ๋ฅผ ์˜คํ”ˆ์†Œ์Šคํ™” ํ•˜์˜€์–ด์š”. ์ฆ‰, ๋ฌด๋ฃŒ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•˜์˜€๋‹ค๋Š” ๋œป์ด์ฃ .

 

 

 

    ๐Ÿ”ฝ Kubernetes

        ๐Ÿ“ฆ Application ๊ตฌ๋™ ๋ฐฉ์‹์˜ ๋ณ€์ฒœ์‚ฌ

์ด ์ด์•ผ๊ธฐ๋ฅผ ํ•˜๊ธฐ ์ „์— ๋จผ์ € ์šฉ์–ด๋ถ€ํ„ฐ ์ •๋ฆฌํ•ด ๋ณด๊ณ  ๊ฐˆ๊ฒŒ์š”.

์šฉ    ์–ด ๋‚ด     ์šฉ
Container Application์ด ๊ตฌ๋™๋˜๋Š” ํ™˜๊ฒฝ๊นŒ์ง€ ๊ฐ์‹ธ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š” ๊ฒฉ๋ฆฌ ๊ธฐ์ˆ 
Container Runtime Container๋ฅผ ๋‹ค๋ฃจ๋Š” ๋„๊ตฌ
Docker Container๋ฅผ ๋‹ค๋ฃจ๋Š” ๋„๊ตฌ ์ค‘ ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉ๋˜๋Š” ๋„๊ตฌ
Kubernetes Container Runtime์„ ํ†ตํ•ด Container๋ฅผ Orchestrationํ•˜๋Š” ๋„๊ตฌ
Orchestration ์—ฌ๋Ÿฌ ์„œ๋ฒ„์— ๊ฑธ์นœ Container ๋ฐ ์‚ฌ์šฉํ•˜๋Š” ํ™˜๊ฒฝ ์„ค์ •์„ ๊ด€๋ฆฌํ•˜๋Š” ์ž‘์—…


Container๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ๊ตฌ๋™ํ•˜๋ ค๋Š” Application์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ํ™˜๊ฒฝ๊นŒ์ง€ ๊ฐ์‹ธ ์–ด๋””์„œ๋“  ์‰ฝ๊ฒŒ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด ์ฃผ๋Š” ๊ธฐ์ˆ ์„ ๋งํ•ด์š”.

์˜ˆ๋ฅผ ํ•˜๋‚˜ ๋“ค์ž๋ฉด PC์— Program์„ ์„ค์น˜ํ•  ๋•Œ, ํŠน์ • Path(๊ฒฝ๋กœ)๋ฅผ ๋งž์ถฐ ์„ค์น˜ํ•˜๊ฑฐ๋‚˜, PC Option์— ํ•„์š”ํ•œ ๊ฒƒ๋“ค์„ ํ•˜๋‚˜ํ•˜๋‚˜ ๋งž์ถฐ๊ฐ€๋ฉด์„œ ์„ค์น˜ํ•˜๋Š” ๊ณผ์ •์ด ์žˆ๋‹ค๋ฉด ๋งค์šฐ ๋ฒˆ์žก์Šค๋Ÿฌ์šธ ๊ฑฐ์—์š”.

Container๋Š” ์ด๋Ÿฌํ•œ ํ™˜๊ฒฝ๊นŒ์ง€ ๋ชจ๋‘ ํฌํ•จํ•˜์—ฌ Host ํ˜น์€ ๋‹ค๋ฅธ Container์™€ ๋…๋ฆฝ์ ์œผ๋กœ Program ์‹คํ–‰์„ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ด์ฃผ๋Š” ๊ธฐ์ˆ ์ด์—์š”.

Container ํ™˜๊ฒฝ์„ ๋ฌถ์–ด ๋ฐฐํฌํ•œ Container Image๋ฅผ ๋‚ด๋ ค ๋ฐ›์•„ ๊ตฌ๋™ํ•˜๋ฉด ์‹คํ–‰๋˜๊ธฐ ๋•Œ๋ฌธ์—, ๊ฐ์ข… ์„ค์ • ๊ณผ์ •์ด ์ค„์–ด ๋“ค์–ด ๋ณด๋‹ค ํŽธ๋ฆฌํ•˜๊ฒŒ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋‹ต๋‹ˆ๋‹ค.

 ๋˜ํ•œ, Container๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ, ํ•„์š”ํ•œ ๋„๊ตฌ๊ฐ€ Container Runtime์ด๋ผ๋Š” ๊ฑด๋ฐ, ์ด๊ฒƒ์€ Container๋ฅผ ์‰ฝ๊ฒŒ ๋‚ด๋ ค ๋ฐ›๊ฑฐ๋‚˜, ๊ณต์œ ํ•˜๊ณ , ๊ตฌ๋™ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ๋„๊ตฌ๋ฅผ ๋งํ•ด์š”.

์ข…๋ฅ˜ ๋˜ํ•œ ์—ฌ๋Ÿฌ๊ฐ€์ง€๊ฐ€ ์žˆ๋Š”๊ฑธ ํ˜น์‹œ ์•Œ๊ณ  ๊ณ„์…จ๋‚˜์š”? ๊ทธ ์ค‘ ๊ฐ€์žฅ ์œ ๋ช…ํ•˜๊ณ , ๋งŽ์ด ์ด์šฉ๋˜๋Š” ๊ฒƒ์ด ๋ฐ”๋กœ Docker์—์š”. Docker๊ฐ€ ์‚ฌ์šฉํ•˜๋Š” Container ๊ทœ๊ฒฉ์€ ํ‘œ์ค€ํ™” ๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— Docker๊ฐ€ ์•„๋‹Œ ๋‹ค๋ฅธ Container Runtime๋“ค๋„ Docker๋กœ ๋งŒ๋“  Container๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ต๋‹ˆ๋‹ค.

k8s๋Š” Container Runtime์„ ํ†ตํ•ด Container๋ฅผ ๋‹ค๋ฃจ๋Š” ๋„๊ตฌ๋ฅผ ๋งํ•ด์š”. k8s๊ฐ€ ํ•ด์ฃผ๋Š” ์ผ์€ ์—ฌ๋Ÿฌ Server(Node ๋ผ๊ณ  ์นญํ•จ)์— Container๋ฅผ ๋ถ„์‚ฐ ๋ฐฐ์น˜ํ•˜๊ฑฐ๋‚˜, ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธด Container๋ฅผ ๊ต์ฒดํ•˜๊ฑฐ๋‚˜, Container๊ฐ€ ์‚ฌ์šฉํ•  ๋น„๋ฐ€๋ฒˆํ˜ธ๋‚˜, ํ™˜๊ฒฝ ์„ค์ •์„ ๊ด€๋ฆฌํ•˜๊ณ , ์ฃผ์ž…ํ•ด ์ฃผ๋Š” ์ผ ๋“ฑ์„ ํ•œ๋‹ต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์ž‘์—…๋“ค์„ Container Orchestration์ด๋ผ๊ณ  ํ•ด์š”.

๋˜ํ•œ, k8s๋Š” Docker๋ฅผ ๋‹ค๋ฃจ๋Š” ๊ธฐ์ˆ ์€ ์•„๋‹ˆ์—์š”. ์œ„์—์„œ ์ด์•ผ๊ธฐ ํ–ˆ ๋“ฏ k8s๋Š” Container ๋ถ„์‚ฐ ๋ฐฐ์น˜, ์ƒํƒœ ๊ด€๋ฆฌ ๋ฐ Container ๊ตฌ๋™ ํ™˜๊ฒฝ๊นŒ์ง€๋งŒ ๊ด€๋ฆฌํ•˜๋Š” ๋„๊ตฌ์ด๊ณ , Docker๋Š” Container๋ฅผ ๋‹ค๋ฃจ๋Š” ๋„๊ตฌ(Container Runtime)๋„๊ตฌ ์ค‘ ํ•˜๋‚˜์—์š”.

k8s๋Š” Container๋ฅผ ๋‹ค๋ฃจ๊ธฐ ์œ„ํ•ด Docker ์™ธ์— ๋‹ค์–‘ํ•œ Container Runtime Software์™€ ์—ฐ๋™ํ•  ์ˆ˜ ์žˆ์–ด์š”.


์ถœ์ฒ˜: https://kubernetes.io/ko/docs/concepts/overview/

 


k8s๋‚˜, Docker๋ฅผ ๊ฒ€์ƒ‰ํ•˜๋ฉด ๋งŽ์ด ๋ณด์•˜์„ ๊ทธ๋ฆผ์ด์—์š”.

Virtualized Deployment์—์„œ Hypervisor์™€ Container Deplyment์— Container Runtime ๊ทธ๋ฆฌ๊ณ , VM, Bin/Library, App์ด๋ผ๋Š” ์šฉ์–ด๋Š” ๊ณผ์—ฐ ๋ฌด์—‡์ผ๊นŒ์š”?

์ตœ์ดˆ Traditional Deployment์€ ๊ฐ€์ƒํ™” ์ด์ „ ์ƒํ™ฉ์„ ๋งํ•˜๋Š”๋ฐ, ์šฐ๋ฆฌ๊ฐ€ PC๋ฅผ ๊ตฌ๋งคํ•ด์„œ OS๋ฅผ ์„ค์น˜ํ•˜๊ณ , ๊ทธ ๊ณณ์— Program์„ ์„ค์น˜ํ•˜๋Š” ๋ฐฉ์‹์„ ์ด์•ผ๊ธฐ ํ•ด์š”.

๊ฐ€์ƒํ™”๊ฐ€ ๋‚˜์˜ค๊ธฐ ์ด ์ „์—๋Š” ํ•œ ๋Œ€์˜ ๋ฌผ๋ฆฌ Server์— OS๋ฅผ ์˜ฌ๋ฆฌ๊ณ , ์—ฌ๋Ÿฌ Application์„ ์„ค์น˜ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ Server๋ฅผ ๋„์ž…ํ–ˆ๊ณ , ๋˜ ๋‹ค๋ฅธ Server๊ฐ€ ํ•„์š”ํ•˜๋ฉด ๋ฌผ๋ฆฌ Server๋ฅผ ์ถ”๊ฐ€ ๊ตฌ๋งคํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ์šด์˜์„ ํ–ˆ์—ˆ์–ด์š”.

ํ•˜์ง€๋งŒ, Server์˜ ๋น„์šฉ์ด ๊ณ ๊ฐ€์ด๊ณ , ์—ฌ๋Ÿฌ Server๋ฅผ ๋ณด์œ ํ•  Rack๊ณผ ๊ทธ Rack์„ ๋ณด๊ด€ํ•  ์žฅ์†Œ๋ฅผ ๋งŒ๋“ ๋‹ค๋Š” ๊ฑด Service ์ฃผ์ฒด ์ž…์žฅ์—์„  ๊ต‰์žฅํžˆ ๋ถ€๋‹ด์Šค๋Ÿฌ์šด ์ผ์ด ์•„๋‹ ์ˆ˜ ์—†์–ด์š”.

๋˜ํ•œ, ํ•œ ๋Œ€์˜ PC์—์„œ ๋ชจ๋“  ๊ฒƒ์„ ์ฒ˜๋ฆฌํ•˜๋ ค๊ณ  ํ•  ๋•Œ, A๋ผ๋Š” Program์ด ๋‹ค๋ฅธ Program ๋™์ž‘์„ ๊ฐ„์„ญํ•˜๊ฑฐ๋‚˜, ํŠน์ • Program์ด ์ž์›์„ ๋…์ ํ•  ๊ฒฝ์šฐ ๋˜ ๋‹ค๋ฅธ Program์˜ ์„ฑ๋Šฅ์ด ๋–จ์–ด์ง€๋Š” ๋“ฑ์˜ ๋‹จ์ ์ด ์žˆ์„ ์ˆ˜ ์žˆ์–ด์š”.

์ด๋Ÿฌํ•œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ๋‚˜์˜จ ๋ฐฉ์•ˆ์ด ์žˆ์—ˆ์œผ๋‹ˆ ๋ฐ”๋กœ Virtualized Deployment ๋ฐฉ์‹์ด์—์š”.

์ด๋Š” ๊ฐ€์ƒ ๋จธ์‹ ์„ ๊ธฐ๋ฐ˜์œผ๋กœ Server๋ฅผ ๊ตฌ์ถ•ํ•˜๋Š” ๋ฐฉ๋ฒ•์ธ๋ฐ, ์ฃผ๋‹ˆ์“ฐ๊ฐ€ Server ๊ตฌ์ถ•์„ ์œ„ํ•ด ์ด ์ „์— ์ž‘์„ฑํ–ˆ๋˜ ๊ธ€๋“ค์„ ๋ณด๋ฉด ESXi, VMware Workstaion, Hyper-V ๋“ฑ๊ณผ ๊ฐ™์€ ๊ฒƒ์„ ์„ค์น˜ํ•˜๊ณ , ๊ฐ€์ƒ ๋จธ์‹ ์„ ์„ค์น˜ํ•˜๊ณ  ์žˆ๋‹ค๊ณ  ์–ธ๊ธ‰ ํ•˜๊ณ  ์žˆ์–ด์š”.

์ด๋Ÿฌํ•œ ๊ฒƒ๋“ค์€ ๊ฐ€์ƒํ™”๋ฅผ ํ•˜๊ธฐ ์œ„ํ•œ OS ํ˜น์€ Program์ด์—์š”.

์ด ๋•Œ, Hypervisor๋ผ๋Š” ์šฉ์–ด๊ฐ€ ๋‚˜์˜ค๋Š”๋ฐ, ์ด๊ฒƒ์€ ํ•˜๋‚˜์˜ System์— ์—ฌ๋Ÿฌ ๊ฐ€์ƒ ๋จธ์‹ ์„ ์—ฌ๋Ÿฌ ๊ฐœ ๊ตฌ๋™ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ์ค‘๊ฐ„ ๊ณ„์ธต์„ ์˜๋ฏธํ•ด์š”. ์ฆ‰, ์‹ค์ œ ๋ฌผ๋ฆฌ ์žฅ๋น„์— OS๋ฅผ ์˜ฌ๋ฆฌ๊ณ , ๊ฐ€์ƒํ™”๋ฅผ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ฃผ๋Š” OS๋‚˜, Program์•ˆ์— ๋‚ด์žฅ๋œ Hypervisor๋ฅผ ํ†ตํ•ด ๋˜ ๋‹ค๋ฅธ ๊ฐ€์ƒ์˜ OS๋ฅผ ์˜ฌ๋ ค ์ „ํ˜€ ๋‹ค๋ฅธ PC๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋“ฏํ•œ ํ™˜๊ฒฝ์„ ๊ตฌ์ถ•ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์ด์—์š”.

Virtualized Deployment ๋ฐฉ์‹์€ ๊ฐ€์ƒ ์ปดํ“จํ„ฐ๋ฅผ ๋งŒ๋“œ๋Š” ๋ฐฉ์‹์ด๊ธฐ ๋•Œ๋ฌธ์— ์‹ค์ œ ๋ฌผ๋ฆฌ PC์—๋„ CPU, RAM, SSD์™€ ๊ฐ™์€ ๋ถ€ํ’ˆ๋“ค์„ ์กฐ๋ฆฝํ•ด ์ฃผ๋“ฏ ๊ฐ€์ƒ ๋จธ์‹ ์—๋„ CPU, RAM, ์ €์žฅ ์žฅ์น˜๋“ค์„ ๊ฐ€์ƒ์œผ๋กœ ๋ถ„๋ฐฐํ•ด์„œ ํ• ๋‹นํ•ด ์ค„ ์ˆ˜ ์žˆ์–ด์š”.

์ด๋Ÿฐ ๋ฐฉ์‹์„ ํ†ตํ•ด Traditional Deployment ๋ฐฉ์‹์—์„œ ์˜ค๋Š” ์—ฌ๋Ÿฌ ๋ฌผ๋ฆฌ Server ๊ตฌ๋งค ํ˜น์€ ๋‹ค๋ฅธ Program๊ณผ์˜ ๋ฌธ์ œ ๋“ฑ์„ ์–ด๋Š ์ •๋„ ํ•ด๊ฒฐ์€ ํ–ˆ์ง€๋งŒ, ์—ฌ์ „ํžˆ ๋ฌผ๋ฆฌ Server๋ฅผ ๊ตฌ๋งคํ•ด์•ผ ํ•˜๊ณ , ์ž์› ๊ด€๋ฆฌ๋ฅผ ํ•ด์•ผ ํ•œ๋‹ค๋Š” ๋‹จ์ ๊ณผ ํ•จ๊ป˜ ์ถ”๊ฐ€์ ์œผ๋กœ OS๊ฐ€ ์˜ฌ๋ผ๊ฐ€๊ธฐ ๋•Œ๋ฌธ์— ๋ฌด๊ฒ๋‹ค๋Š” ๋‹จ์ ์„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์š”.

์ด๋Ÿฌํ•œ ๋‹จ์ ๋“ค์„ ๊ทน๋ณตํ•˜๊ณ ์ž ๋‚˜์˜จ ๊ฒƒ์ด ๋ฐ”๋กœ Container Deployment ๋ฐฉ์‹์ด์—์š”.

Hypervisor ๋Œ€์‹  Container Runtime์„ ์“ฐ๊ณ  ์žˆ๋Š”๊ฑธ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ, Container๋Š” ๊ฐ€์ƒ ๋จธ์‹ ๊ณผ ๋‹ฌ๋ฆฌ Program ๊ตฌ๋™์„ ์œ„ํ•œ ๊ฐ€์ƒ OS ์„ค์น˜๊ฐ€ ํ•„์š”์—†๋Š” ์žฅ์ ์ด ์žˆ์–ด์š”.

์ฆ‰, Host OS ํ•˜๋‚˜๋งŒ ์„ค์น˜ํ•˜๋ฉด ๋œ๋‹ค๋Š” ์˜๋ฏธ์—์š”.

Container ๊ธฐ๋ฐ˜ ๋ฐฉ์‹์€ ์ „ํ†ต์  ๋ฐฉ์‹ ์œ„์— Container Runtime์ด ์˜ฌ๋ผ๊ฐ€ ๊ตฌ๋™์ด ๋˜๋Š”๋ฐ, Container๋Š” OS ๋ฐ‘์— ์ž‘์—…๋“ค์ด ์–ด๋–ป๊ฒŒ ๊ตฌ๋™๋˜๋Š”์ง€ ์ง์ ‘์ ์œผ๋กœ ์—ฐ๊ด€ ์ง€์–ด ๊ตฌ๋™๋˜์ง€ ์•Š์•„์„œ ๊ทธ๋ ‡๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ€์ƒ ๋จธ์‹  ์œ„์— ์˜ฌ๋ผ๊ฐ„ OS์—์„œ ์ถ”๊ฐ€๋กœ Container ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ณ , ์ฃผ๋‹ˆ์“ฐ๋Š” ๊ทธ๋ ‡๊ฒŒ Server ๊ตฌ์ถ•์„ ํ•˜๋ ค๊ณ  ํ•˜๊ณ  ์žˆ์–ด์š”.

๋‹ค๋งŒ, ์ฃผ์˜ํ•  ์ ์€ Container ๋ฐฉ์‹์€ Host OS๋ฅผ ๊ณต์œ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์–ด๋–ค Program์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ธฐ๋ฉด ๋‹ค๋ฅธ Program์—๊ฒŒ ์˜ํ–ฅ์„ ๋ผ์น˜์ง„ ์•Š์•„์š”. ํ•˜์ง€๋งŒ, Program ๋ฌธ์ œ๊ฐ€ Host OS์— ๋ฌธ์ œ๋ฅผ ์•ผ๊ธฐ์‹œํ‚ฌ ๊ฒฝ์šฐ Host OS์—์„œ ๊ตฌ๋™์ค‘์ธ ์ „์ฒด Container์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒ๋  ์ˆ˜๋Š” ์žˆ์–ด์š”.

Container ๋ฐฉ์‹์€ Linux ๊ธฐ์ค€์œผ๋กœ ๊ฐ๊ฐ์˜ Application๋“ค์„ ๋…๋ฆฝ๋œ ํ™˜๊ฒฝ์—์„œ ์‹คํ–‰๋˜๋Š” ๊ฒƒ์ฒ˜๋Ÿผ ๊ฒฉ๋ฆฌํ•ด ์ฃผ๊ณ , CPU, RAM๊ณผ ๊ฐ™์€ ์ž์›๋„ ๋…๋ฆฝ์ ์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” namespace ๋ฐ cgroup ๊ธฐ์ˆ ์ด ํƒ‘์žฌ ๋˜์–ด ์žˆ์–ด์š”.

  Traditional Deployment Virtualized Deployment Container Deployment
๋ฌผ๋ฆฌ ์žฅ๋น„ ๊ฐ๊ฐ์˜ Application ๊ฒฉ๋ฆฌ
ํ•„์š” ์‹œ ๋ฌผ๋ฆฌ ์žฅ๋น„ N๋Œ€
๋ฌผ๋ฆฌ ์žฅ๋น„ 1๋Œ€์— ๋‹ค์ˆ˜ ๊ฐ€์ƒ ๋จธ์‹  ๊ตฌ์ถ•์ด ๊ฐ€๋Šฅํ•˜๋‚˜, ์ž์› ๋ถ€์กฑ ์‹œ ์ถ”๊ฐ€ ์žฅ๋น„ ๊ตฌ๋งค ํ•„์š” ๋ฌผ๋ฆฌ ์žฅ๋น„์— ์˜ํ–ฅ์ด ์ ์Œ
์šด์˜์ฒด์ œ ๋ฌผ๋ฆฌ ์žฅ๋น„์— 1๊ฐœ ์šด์˜์ฒด์ œ ์„ค์น˜ ๋ฌผ๋ฆฌ ์žฅ๋น„ 1๋Œ€์— ์šด์˜์ฒด์ œ ์„ค์น˜ ๋ฐ ๋‹ค์ˆ˜์˜ ๊ฐ€์ƒ ๋จธ์‹ ์— ๊ฐ๊ฐ์˜ OS ์„ค์น˜ ํ•„์š” ๋ฌผ๋ฆฌ ์žฅ๋น„ 1๋Œ€์— ์šด์˜์ฒด์ œ ์„ค์น˜
์ž์›
(Resource)
๋ฌผ๋ฆฌ ์žฅ๋น„์˜ ์ž์›์„ ์—ฌ๋Ÿฌ
Application์ด ๋‚˜๋ˆ  ๊ฐ–๋Š” ๋ฐฉ์‹
Hypervisor๋ฅผ ํ†ตํ•ด ๊ฐ€์ƒ ๋จธ์‹  ๋ณ„ ๊ฐœ๋ณ„์  ์ž์› ํ• ๋‹น Host ์šด์˜์ฒด์ œ์—์„œ
Application ๋ณ„ ์ž์› ํ• ๋‹น ๋ฐ ๊ด€๋ฆฌ
๊ฒฉ๋ฆฌ ์ˆ˜์ค€ X ๊ฐ€์ƒ ๋จธ์‹  ๋ณ„ ์ž์›์„ ๋‚˜๋ˆ  ๋…๋ฆฝ์ ์œผ๋กœ ๊ตฌ๋™ํ•˜๋Š” ๋ฐฉ์‹ OS ํ™˜๊ฒฝ์€ ๊ณต์œ ํ•˜๋‚˜, Application ํ™˜๊ฒฝ์€ ๊ฐ๊ฐ ๊ฒฉ๋ฆฌ
๋ฌธ์ œ ์ „์ด ์—ฌ๋ถ€ ํŠน์ • Application ๋ฌธ์ œ ๋ฐœ์ƒ ์‹œ System ์ „์ฒด ๋ฌธ์ œ ์•ผ๊ธฐ Host OS ๋ฌธ์ œ ๋ฐœ์ƒ ์‹œ ๋ชจ๋“  ๊ฐ€์ƒ ๋จธ์‹  ์ค‘๋‹จ๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์œผ๋‚˜, ๊ฐ๊ฐ์˜ ๊ฐ€์ƒ๋จธ์‹ ์—์„œ ๋ฐœ์ƒํ•œ ๋ฌธ์ œ๊ฐ€ ๋‹ค๋ฅธ ๊ฐ€์ƒ ๋จธ์‹ ์—๊ฒŒ ์˜ํ–ฅ์„ ๋ผ์น  ๊ฐ€๋Šฅ์„ฑ์€ ๋‚ฎ์Œ Host OS ๋ฌธ์ œ ๋ฐœ์ƒ ์‹œ ๋ชจ๋“  Container๊ฐ€ ์ค‘๋‹จ๋  ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์œผ๋ฉฐ, ํŠน์ • Application ๋ฌธ์ œ๊ฐ€ ๋‹ค๋ฅธ Application์— ์˜ํ–ฅ์„ ๋ผ์น˜์ง„ ์•Š์Œ
728x90
 

์ฆ‰, Container๋ฅผ ์ด์šฉํ•˜๊ฒŒ ๋˜๋ฉด Server์—์„œ 1๋ช…์˜ ๊ด€๋ฆฌ์ž๊ฐ€ ๋‹ค์–‘ํ•œ Application์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ๊ฐ์˜ Program์„ Container๋กœ ๊ตฌํ˜„ํ•  ํ•„์š”๊ฐ€ ๊ฑฐ์˜ ์—†๋‹ค๊ณ  ํ•ด์š”.

๊ธฐ์—… ํ™˜๊ฒฝ์—์„œ ๋‹ค์ˆ˜์˜ ๊ด€๋ฆฌ์ž๊ฐ€ ์ˆ˜๋ฐฑ, ์ˆ˜์ฒœ ๋Œ€ Server๋ฅผ ํ•จ๊ป˜ ๊ด€๋ฆฌํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ผ๊ด€์„ฑ์ด ๊ต‰์žฅํžˆ ์ค‘์š”ํ•ด์š”.

๋ฌผ๋ก  ๊ธฐ๊น”๋‚˜๋Š” ์‚ฌ๋žŒ๋“ค์€ ๊ทธ ์ •๋„์— Server๋ฅผ ๊ตฌ์ถ•ํ•˜์ง„ ๋ชปํ•˜๊ฒ ์ง€๋งŒ, ๊ธฐ์—…๊ณผ ๊ฐ™์ด ํ”„๋กœ์ ํŠธ๋ฅผ ํ•ด ๋ณด๋Š” ๊ฒƒ์ด ์ปจ์…‰์ธ ๋งŒํผ ์ด ๋ถ€๋ถ„๋„ ๊ต‰์žฅํžˆ ์‹ฌ๋„์žˆ๊ฒŒ ๊ณ ๋ คํ•˜๊ณ  ์žˆ์–ด์š”.

์ด๋Ÿฐ ๊ฒฝ์šฐ Container Infra ํ™˜๊ฒฝ์„ ๊ตฌ์„ฑํ•œ๋‹ค๋ฉด ์—ฌ๋Ÿฌ ์‚ฌ๋žŒ์ด ์ž‘์—…ํ•˜์—ฌ ์„ค์ •์˜ ์ผ๊ด€์„ฑ์ด ๋–จ์–ด์ง€๋Š” ๋ฌธ์ œ๋ฅผ ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ์–ด์š”.

๋˜ํ•œ, ๊ฐ€์ƒํ™” ํ™˜๊ฒฝ์—์„œ ๊ฐ๊ฐ์˜ Virtual Machine์ด ๋ชจ๋‘ ๋…๋ฆฝ์ ์ธ OS Kernel์„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์œ„์—์„œ ์ด์•ผ๊ธฐ ํ•œ๋Œ€๋กœ ์ž์› ๋‚ญ๋น„๊ฐ€ ์‹ฌํ•  ์ˆ˜ ์žˆ๋Š”๋ฐ, Container Infra์˜ ๊ฒฝ์šฐ OS Kernel ํ•˜๋‚˜์— Container ์—ฌ๋Ÿฌ ๊ฐœ๊ฐ€ ๊ฒฉ๋ฆฌ๋œ ํ˜•ํƒœ๋กœ ์‹คํ–‰๋˜๋ฏ€๋กœ, ์ž์›์„ ๋ณด๋‹ค ํšจ์œจ์ ์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ณ , ๋‹จ๊ณ„ ๋‹จ๊ณ„ ๊ฑฐ์น˜๋Š” ๊ฒƒ๋“ค์ด ์ ์–ด ์†๋„๋„ ํ›จ์”ฌ ๋น ๋ฅด๋‹ค๋Š” ์žฅ์ ์„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์š”.

ํ•˜์ง€๋งŒ, ํ•œ๊ฐ€์ง€ ์ฐธ๊ณ ํ•ด์•ผ ํ•  ์‚ฌํ•ญ์€ Container ํ™˜๊ฒฝ์—์„œ Window๋Š” ๊ตฌ๋™ํ•  ์ˆ˜ ์—†์–ด์š”.
์ด๋Š” Container๊ฐ€ Linux Kernel ๊ธฐ๋ฐ˜์ด๊ธฐ ๋•Œ๋ฌธ์ด์—์š”.

k8s๋Š” ๊ฐ€์ƒํ™” ํ™˜๊ฒฝ ์ƒ์šฉ ์†”๋ฃจ์…˜์„ ์ด์šฉํ•ด ์•ˆ์ •์ ์œผ๋กœ System ์šด์šฉ์ด ๊ฐ€๋Šฅํ–ˆ๊ณ , ๊ด€๋ฆฌ ๋˜์—ˆ๋˜ ์ง€๋‚œ ๊ณผ๊ฑฐ๊ฐ€ ์žˆ์—ˆ๊ณ , ์ง€๊ธˆ๋„ ์ด๋ฅผ ์ด์šฉํ•ด์„œ System์„ ๊ตฌ์ถ•ํ•˜๋Š” ๊ณณ์ด ๋งŽ์ง€๋งŒ, ์‹œ๊ฐ„์ด ์ง€๋‚˜๋ฉด์„œ Kernel๋ฅผ ํ†ตํ•ด ๋” ๋งŽ์€ Application์„ ์˜ฌ๋ฆด ์ˆ˜ ์žˆ๋Š” Container๊ฐ€ ๋„์ž…๋˜๋ฉด์„œ ๋Š˜์–ด๋‚œ Conatiner ๊ด€๋ฆฌ ํ•„์š”์„ฑ์ด ์ƒ๊ฒจ ๋ฒ„๋ฆฐ ๊ฒƒ์ด์—์š”.

๊ธฐ์กด Container ๊ด€๋ฆฌ ์†”๋ฃจ์…˜์ด์˜€๋˜ Docker Swarm, Mesos, Nomad ๋“ฑ์€ ํ˜„์—…์˜ ์š”๊ตฌ ์‚ฌํ•ญ์„ ์ถฉ์กฑ ์‹œํ‚ค๊ธฐ์—” ๋„ˆ๋ฌด ๊ณผํ•˜๊ฑฐ๋‚˜, ๋ถ€์กฑํ•œ ์ ์ด ์žˆ์—ˆ์–ด์š”.
์ด๋Ÿฌํ•œ ์ด์œ ๋กœ Container Infra ํ™˜๊ฒฝ์ด ์ฃผ๋Š” ๋งŽ์€ ์žฅ์ ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ , ๋ณดํŽธํ™”๊ฐ€ ์–ด๋ ค์› ์ง€์š”.

k8s๋Š” ์ด๋Ÿฌํ•œ ๊ฒƒ๋“ค์„ ๋‹ค๋“ฌ์–ด ๋‚˜์˜จ Container ๊ด€๋ฆฌ ์†”๋ฃจ์…˜์ด์—์š”.

 

 

 

    ๐Ÿ”ฝ k8s์™€ ์นœํ•ด์ง€๊ธฐ

        ๐Ÿ“ฆ Container Ohchestration

์ข…  ๋ฅ˜ ์ƒ์„ธ ๋‚ด์šฉ
Docker Wwarm โˆ™ ๊ฐ„๋‹จํ•œ ์„ค์น˜, ์‚ฌ์šฉ ์šฉ์ด
โˆ™ ๊ธฐ๋Šฅ์ด ๋‹ค์–‘ํ•˜์ง€ ์•Š์•„ ๋Œ€๊ทœ๋ชจ ํ™˜๊ฒฝ์— ์ ์šฉ ์‹œ ์‚ฌ์šฉ์ž ํ™˜๊ฒฝ ๋ณ€๊ฒฝ ํ•„์š”
โˆ™ ์†Œ๊ทœ๋ชจ ํ™˜๊ฒฝ์— ์œ ์šฉ
Mesos โˆ™ Apache Open Source Project๋กœ Twitter, ์—์–ด๋น„์—”๋น„, Apple, Uber ๋“ฑ์—์„œ ๊ฒ€์ฆ๋œ ์†”๋ฃจ์…˜
โˆ™ 2016๋…„ DC/OS
   (Data Center OS, ๋Œ€๊ทœ๋ชจ ํ™˜๊ฒฝ์—์„œ ์ž์›์„ ์œ ์—ฐํ•˜๊ฒŒ ๊ณต์œ ํ•˜๋ฉฐ, ํ•˜๋‚˜์˜ ์ž์›์ฒ˜๋Ÿผ ๊ด€๋ฆฌํ•˜๋Š” ๋„๊ตฌ) ์ง€์›์œผ๋กœ
    ๋งค์šฐ ๊ฐ„๊ฒฐํ•ด์ง
โˆ™ ๊ธฐ๋Šฅ์„ ์ถฉ๋ถ„ํžˆ ํ™œ์šฉํ•˜๊ณ ์ž ํ•œ๋‹ค๋ฉด ๋ถ„์‚ฐ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ ์—ฐ๋™ ํ•„์š”
โˆ™ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์†”๋ฃจ์…˜์„ ์œ ๊ธฐ์ ์œผ๋กœ ๊ตฌ์„ฑํ•ด์•ผ ํ•˜๋Š” ๋ถ€๋‹ด

Nomad โˆ™ ๋ฒ ์ด๊ทธ๋ŸฐํŠธ๋ฅผ ๋งŒ๋“  ํ•ด์‹œ์ฝ”ํ”„์‚ฌ์˜ Container Ohchestration
โˆ™ ๊ฐ„๋‹จํ•œ ๊ตฌ์„ฑ์œผ๋กœ Container Ohchestration ํ™˜๊ฒฝ ์ œ๊ณต
โˆ™ ๊ธฐ๋Šฅ์ด ๋ถ€์กฑํ•˜์—ฌ ์—ฌ๋Ÿฌ ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜๋Š” ํ™˜๊ฒฝ์ด ์•„๋‹Œ ๊ฐ€๋ณ๊ณ , ๊ฐ„๋‹จํ•œ ๊ธฐ๋Šฅ๋งŒ ํ•„์š”ํ•œ ํ™˜๊ฒฝ์—์„œ ์‚ฌ์šฉ ๊ถŒ์žฅ
โˆ™ ํ•ด์‹œ์ฝ”ํ”„์˜ Consul(์„œ๋น„์Šค ๊ฒ€์ƒ‰, ๊ตฌ์„ฑ ๋ฐ ๋ถ„ํ•  ๊ธฐ๋Šฅ ์ œ๊ณต)๊ณผ Vault(์•”ํ˜ธํ™” ์ €์žฅ์†Œ)์™€์˜ ์—ฐ๋™์ด ์›ํ• ํ•˜์—ฌ
   ์ด๋Ÿฐ ๋„๊ตฌ์— ๋Œ€ํ•œ ์‚ฌ์šฉ ์„ฑ์ˆ™๋„๊ฐ€ ๋†’์€ ๊ธฐ์—… ํ˜น์€ ์กฐ์ง์ธ ๊ฒฝ์šฐ ๋„์ž…ํ•ด๋„ ์ข‹์Œ
Kubernetes โˆ™ ๋‹ค๋ฅธ ์†”๋ฃจ์…˜์— ๋น„ํ•ด ๋Ÿฌ๋‹ ์ปค๋ธŒ๊ฐ€ ๋‹ค์†Œ ์žˆ์œผ๋‚˜, ์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋„๊ตฌ๋“ค์ด ์žˆ์–ด ์„ค์น˜๊ฐ€ ์‰ฌ์›Œ์ง€๋Š” ์ถ”์„ธ
โˆ™ ๋‹ค์–‘ํ•œ ํ˜•ํƒœ๋กœ ๋ฐœ์ „ํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, Container Ohchestratio์„ ๋„˜์–ด IT Infra ์ž์ฒด๋ฅผ Containerํ™” ํ•˜๊ณ ,
   Containerํ™”๋œ Infra ์ œํ’ˆ๊ตฐ์„ k8s ์œ„์—์„œ ๋™์ž‘ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์คŒ
โˆ™ ๋งŽ์€ Vender์™€ Opne Source ์ง„์˜์—์„œ k8s๋ฅผ ์ง€์›ํ•˜๊ณ , ๊ทธ์— ๋งž๊ฒŒ ํ†ตํ•ฉ ๊ฐœ๋ฐœ ์ค‘

 

 

๐Ÿ’ก ์šฉ์–ด ์ •๋ฆฌ
1. Ohchestration
   ๋ณต์žกํ•œ ๋‹จ๊ณ„๋ฅผ ๊ด€๋ฆฌํ•˜๊ณ , ์š”์†Œ๋“ค์˜ ์œ ๊ธฐ์  ๊ด€๊ณ„๋ฅผ ๋ฏธ๋ฆฌ ์ •์˜ํ•˜์—ฌ ์†์‰ฝ๊ฒŒ ์‚ฌ์šฉํ•˜๋„๋ก ์„œ๋น„์Šค ์ œ๊ณตํ•˜๋Š” ๋„๊ตฌ

2. Container Ohchestration
    ๋‹ค์ˆ˜์˜ Container๋ฅผ ์œ ๊ธฐ์ ์œผ๋กœ ์—ฐ๊ฒฐ, ์‹คํ–‰, ์ข…๋ฃŒํ•  ๋ฟ ์•„๋‹ˆ๋ผ, ์ƒํƒœ ์ถ”์  ๋ฐ ๋ณด์ „ํ•˜๋Š” ๋“ฑ Container๋ฅผ ์•ˆ์ •์ ์œผ๋กœ
    ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด์ฃผ๋Š” ๋„๊ตฌ

 

 

 

        ๐Ÿ“ฆ k8s ๊ตฌ์„ฑ ๋ฐฉ๋ฒ•

์ข…    ๋ฅ˜ ์ƒ์„ธ ๋‚ด์šฉ
๊ด€๋ฆฌํ˜• k8s Public Cloud ์—…์ฒด์—์„œ ์ œ๊ณตํ•˜๋Š” ๊ด€๋ฆฌํ˜• k8s์ธ EKS(Amazon Elastic Kubernetes Service),
AKS(Azure Kubernetes Service), GKE(Google Kubernetes Service) ๋“ฑ

๊ตฌ์„ฑ์ด ์ด๋ฏธ ๋‹ค ๊ฐ–์ถฐ์ ธ ์žˆ๊ณ , Master Node๋ฅผ Cloud ์—…์ฒด์—์„œ ๊ด€๋ฆฌํ•˜๊ธฐ ๋•Œ๋ฌธ์—
์ดˆ๋ณด์ž๊ฐ€ ํ•™์Šต์šฉ์œผ๋กœ ์ด์šฉํ•˜๊ธฐ์—” ๋ถ€์ ์ ˆ
์„ค์น˜ํ˜• k8s Suse์˜ Rancher, Red Hat์˜ OpenShift์™€ ๊ฐ™์€ Platform์—์„œ ์ œ๊ณตํ•˜๋Š” ์„ค์น˜ํ˜• k8s

์œ ๋ฃŒ์ด๊ธฐ ๋•Œ๋ฌธ์— ์‰ฝ๊ฒŒ ์ ‘๊ทผ์ด ์–ด๋ ค์›€
๊ตฌ์„ฑํ˜• k8s ์‚ฌ์šฉํ•˜๋Š” System์— k8s Cluster๋ฅผ ์ž๋™์œผ๋กœ ๊ตฌ์„ฑํ•ด์ฃผ๋Š” ์†”๋ฃจ์…˜ ์‚ฌ์šฉ

์ฃผ์š” ์†”๋ฃจ์…˜: kubeadm, kops(Kubernetes Operation), KRID(Kubernetes Rebar Integrated Bootstrap),
Kuberspray (kubeadm์ด ๊ฐ€์žฅ ๋ณดํŽธํ™”๋จ.)

kubeadm์€ ์‚ฌ์šฉ์ž๊ฐ€ ๋ณ€๊ฒฝํ•˜๊ธฐ ์ˆ˜์›”ํ•˜๋ฉฐ, On-premises์™€ Cloud๋ฅผ ๋ชจ๋‘ ์ง€์›ํ•˜๋ฉฐ, ๋Ÿฌ๋‹ ์ปค๋ธŒ๊ฐ€ ์•ฝํ•œ ํŽธ
๋ฐ˜์‘ํ˜•

 

 

Cloud Native Landscape

The Cloud Native Landscape organizes all cloud native open source projects and proprietary products into categories, providing an overview of the current ecosystem

landscape.cncf.io

 

 


k8s๋Š” ์˜คํ”ˆ ์†Œ์Šค ๊ธฐ๋ฐ˜์˜ Containerํ™” ๋œ Application(Work load & Service)์˜ ์ž๋™ ๋ฐฐํฌ, ์Šค์ผ€์ผ๋ง ๋“ฑ์„ ์ œ๊ณตํ•˜๋Š” ๊ด€๋ฆฌ Platform์ด์—์š”.

K8s์™€ Docker๋Š” ์—„์—ฐํžˆ ๋‹ค๋ฅธ ์†”๋ฃจ์…˜์ด์—์š”. K8s์™€ Docker๋Š” ์ƒํ˜ธ ๋Œ€์ฒดํ•  ์ˆ˜ ์—†์–ด์š”.

K8s๋Š” Container ๊ฐ€์ƒํ™” ๊ธฐ์ˆ ์„ ์ด์šฉํ•œ Service, Packaging๋œ Serivce์˜ ์ž๋™ ๋ฐฐํฌ, Scaling ์ž‘์—…์„ ๋„์™€์ฃผ๋Š” ๋„๊ตฌ์—์š”.





K8s์˜ ์žฅ/ ๋‹จ์ 

์žฅ       ์ 

๋‹จ       ์ 

Containerํ™” ๋œ Application ๊ตฌ๋™

Source Code ๋ฐฐํฌ ๋ถˆ๊ฐ€, Build ๋ถˆ๊ฐ€

Service Discovery & Load balancing

Application Level Service ์ง€์› ์—†์Œ

Storage orchestration

Logging, Monitoring Solution ์ง€์› ์—†์Œ

์ž๋™ํ™”๋œ Roll Out, Roll Back

ํฌ๊ด„์  Machine Setting,
์œ ์ง€๋ณด์ˆ˜, ๊ด€๋ฆฌ, ์ž๋™ ๋ณต๊ตฌ ์‹œ์Šคํ…œ ์ œ๊ณต ์—†์Œ

์ž๋™ํ™”๋œ Bin Packing

 

์ž๋™ํ™”๋œ Self-Healing (๋ณต๊ตฌ)

 

Secret & composition Management (๊ตฌ์„ฑ ๊ด€๋ฆฌ)

 





K8s Cluster๋ž€?


K8s๋Š” Master Node(๊ฐ๊ฐ์˜ Work Node ๊ด€๋ฆฌ)์™€ ์‹ค์ œ Container ์ž์ฒด ์šด์˜, ์Šค์ผ€์ฅด๋ง์„ ๋‹ด๋‹นํ•˜๋Š” ๊ฒƒ์ด Work Node์ด๊ณ , ์ด ๋‘๊ฐ€์ง€๋ฅผ ํ•ฉ์ณ์„œ ๋ถ€๋ฅด๋Š” ๊ฒƒ์ด K8s Cluster์—์š”.

Master Node ์•ˆ์—๋Š” ์„ค์ • ์ •๋ณด(etcd), ์‚ฌ์šฉ์ž ์Šค์ผ€์ฅด ๊ด€๋ฆฌ(sched), api ๋“ฑ์„ ์ฒ˜๋ฆฌํ•  ์ˆ˜ ์žˆ๋„๋ก ๊ตฌ์„ฑ์ด ๋˜์–ด ์žˆ์–ด์š”.

Work Node ์•ˆ์—๋Š” ์‹ค์ œ๋กœ ์šด์˜ํ•˜๊ณ ์ž ํ•˜๋Š” Container๋“ค์„ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ pod๋ผ๋Š” ๊ฐœ๋…, ์ด pod๋ฅผ ์šด์˜ํ•˜๊ธฐ ์œ„ํ•œ kubelet์ด๋ผ๋Š” ๊ฐœ๋…์ด ํฌํ•จ๋˜์–ด ์žˆ์–ด์š”.


 
๊ฐœ๋ฐœ์ž๋‚˜, ๊ด€๋ฆฌ์ž๊ฐ€ ๊ฐ๊ฐ์˜ ์ ‘๊ทผ Tool(UI๋ฅผ ๊ฐ€์ง„ Web Service Tool ํ˜น์€ CLI Tool)๋กœ K8s Master Node API์— ๋ช…๋ น์–ด๋ฅผ ์ „๋‹ฌํ•˜๋ฉด API๋Š” ์ž๊ธฐ๊ฐ€ ๊ฐ€์šฉํ•  ์ˆ˜ ์žˆ๋Š” Work Node๋“ค์—๊ฒŒ ๊ฐœ๋ฐœ์ž๋‚˜, ๊ด€๋ฆฌ์ž๊ฐ€ ๋ณด๋‚ธ ๋ช…๋ น์–ด๋ฅผ ์ „๋‹ฌํ•˜๊ฒŒ ๋˜์š”.

API๊ฐ€ ์ „๋‹ฌํ•œ ๋ช…๋ น์–ด๋Š” Cube(K8s) Proxy๊ฐ€ ๋ฐ›๋Š” ์—ญํ• ์„ ํ•˜๋Š”๋ฐ,  Cube(K8s) Proxy๋Š” Cluster์˜ ๊ฐ Work Node์—์„œ ์‹คํ–‰๋˜๊ณ  ์žˆ๋Š” Network Proxy์—์š”.
์ฆ‰, K8s์—์„œ Service์˜ ๊ฐœ๋…์œผ๋กœ ๋ณด๋ฉด ์ข‹์„ ๊ฑฐ ๊ฐ™์•„์š”. ์ด ์นœ๊ตฌ๋Š” Network์— ์œ ์ง€, ๊ด€๋ฆฌ๋ฅผ ๋‹ด๋‹นํ•˜๊ณ  ์žˆ์–ด์š”.




Master Node์—์„œ ๊ฐ๊ฐ ๊ฐ€์šฉํ•  ์ˆ˜ ์žˆ๋Š” Work Node์— ์–ด๋–ค ๋ช…๋ น์–ด๋ฅผ ์ „๋‹ฌํ•˜๋ฉด ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ Container๋ฅผ Pod ํ˜•ํƒœ๋กœ ๋ฌถ์–ด์„œ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜๋Š” ๊ฒƒ์ด ์ผ๋ฐ˜์ ์ธ ํ˜•ํƒœ์—์š”.

K8s๋Š” ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์ตœ์†Œํ•œ์˜ ๋‹จ์œ„์ธ Pod๋ผ๋Š” ํ˜•ํƒœ๋กœ ๋ฌถ์–ด ๋ฐฐํฌ๋ฅผ ํ•˜๊ฒŒ ๋˜๊ณ , ์ด Pod์•ˆ์—๋Š” ์—ฌ๋Ÿฌ Container๊ฐ€ ์กด์žฌํ•  ์ˆ˜ ์žˆ์–ด์š”.

๊ฐ๊ฐ์˜ Work Node๋Š” Container๋ฅผ ์šด์˜ํ•˜๊ธฐ ์œ„ํ•œ Container Engine์„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์•ผ ํ•ด์š”.

Work Node๋ฅผ ๋‹จ์ผ Node๋กœ ๊ตฌ์„ฑํ•  ์ˆ˜๋„ ์žˆ์ง€๋งŒ, ์•ˆ์ •์ ์ธ Service๋ฅผ ์œ„ํ•ด Multi Node๋ฅผ ๊ฐ€์ง€๊ณ , K8s Cluster๋ฅผ ๊ตฌ์„ฑํ•˜๋Š”๊ฒŒ ์ข‹์•„์š”.




Pod์•ˆ์— ํฌํ•จ๋˜์–ด ์žˆ๋Š” ์ฆ‰, Work Node์•ˆ์— ํฌํ•จ๋˜์–ด ์žˆ๋Š” Service๋ฅผ ํ™•๋Œ€ํ•ด์„œ ์‚ดํŽด๋ณผ๊ฒŒ์š”.

์ผ๋‹จ, Service์™€ Pod ๊ฐœ๋…์ด ์กด์žฌํ•˜๋Š”๋ฐ, ์ด ๋‘ ์นœ๊ตฌ๋Š” K8s๊ฐ€ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” Object ๋˜๋Š” ์ž์›(Resource)๋ผ๊ณ  ๋ถˆ๋ฆฌ๋Š” ๊ฐœ๋…์ด๊ณ , Service๋Š” ๊ฐ๊ฐ์˜ Pod ๊ฐ„์— Data๋ฅผ ์ฃผ๊ณ  ๋ฐ›์„ ์ˆ˜ ์žˆ๋„๋ก Network ๊ด€๋ จ ์ž‘์—…์„ ์ฒ˜๋ฆฌํ•˜๋Š” ์นœ๊ตฌ์—์š”.

Pod๋Š” Container๋“ค์ด Packaging ๋˜์–ด ์žˆ๋Š” ์ตœ์†Œํ•œ์˜ ๋‹จ์œ„์ด๊ณ , Application๋“ค์ด ๋ฌถ์—ฌ ์žˆ๋Š” ๊ฒƒ์ด๋ผ๊ณ  ๋ณด๋ฉด ๋  ๊ฑฐ ๊ฐ™์•„์š”.











๐Ÿง ์ฐธ๊ณ  ์ž๋ฃŒ

 

[DevOps] Jenkins๋ฅผ ์ด์šฉํ•œ CI/CD Pipeline ๊ตฌ์ถ• - Jenkins + Ansible + Kubernetes ์™€์˜ ์—ฐ๋™

์ด ๋‚ด์šฉ์€ ์ธํ”„๋Ÿฐ - Jenkins๋ฅผ ์ด์šฉํ•œ CI/CD Pipeline ๊ตฌ์ถ• ๊ฐ•์˜๋ฅผ ๋ณด๊ณ  ์ •๋ฆฌํ•œ ๋‚ด์šฉ ์ž…๋‹ˆ๋‹ค. ํ•ด๋‹น ๋‚ด์šฉ์˜ Code ๋‚ด์šฉ์€ ์ด ๊ณณ์—์„œ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๐Ÿ—‚ ๋ชฉ์ฐจ โ— [DevOps] Jenkins๋ฅผ ์ด์šฉํ•œ CI/CD Pipeline ๊ตฌ

junyharang.tistory.com

 

 

์šด์˜ ์ˆ˜์ค€์˜ ์ปจํ…Œ์ด๋„ˆ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜

์šด์˜ ์ˆ˜์ค€์˜ ์ปจํ…Œ์ด๋„ˆ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜

kubernetes.io

 

 

 

 

 

์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ์™„๋ฒฝ ๊ฐ€์ด๋“œ:์ž…๋ฌธ๋ถ€ํ„ฐ ์‹ค์ œ ์šด์šฉ๊นŒ์ง€ ํ•„์š”ํ•œ ๊ธฐ์ˆ  ์ด๋ง๋ผ!

COUPANG

www.coupang.com

"์ด ํฌ์ŠคํŒ…์€ ์ฟ ํŒก ํŒŒํŠธ๋„ˆ์Šค ํ™œ๋™์˜ ์ผํ™˜์œผ๋กœ, ์ด์— ๋”ฐ๋ฅธ ์ผ์ •์•ก์˜ ์ˆ˜์ˆ˜๋ฃŒ๋ฅผ ์ œ๊ณต๋ฐ›์Šต๋‹ˆ๋‹ค."

 

 

 

 

 

728x90
๋ฐ˜์‘ํ˜•

'์ด๋ก  ์ •๋ฆฌ' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[์ด๋ก  ๋‚ด์šฉ] ZFS๋ž€?  (0) 2023.07.07
[WiKi] ๋ฌธ๋ฒ• ์ •๋ฆฌ  (0) 2022.10.28
[REDMINE] ์‚ฌ์šฉ ๋ฐฉ๋ฒ•  (0) 2022.10.27