๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
728x90
๋ฐ˜์‘ํ˜•

์ฟ ๋ฒ„๋„คํ‹ฐ์Šค6

[k8s] Kubernetes Scheduling https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/ Kubernetes SchedulerIn Kubernetes, scheduling refers to making sure that Pods are matched to Nodes so that Kubelet can run them. Scheduling overview A scheduler watches for newly created Pods that have no Node assigned. For every Pod that the scheduler discovers, the schedulekubernetes.io์Šค์ผ€์ค„๋ง์ด๋ž€?์ฟ ๋ฒ„๋„คํ‹ฐ์Šค์—์„œ ์Šค์ผ€์ค„๋ง์ด๋ž€ kubelet์œผ๋กœ ์‹คํ–‰ํ•  ์ˆ˜.. 2024. 12. 4.
[k8s] Pod๋ž€? https://kubernetes.io/docs/concepts/workloads/pods/ PodsPods are the smallest deployable units of computing that you can create and manage in Kubernetes. A Pod (as in a pod of whales or pea pod) is a group of one or more containers, with shared storage and network resources, and a specification for how to run tkubernetes.io๐ŸŒŸ Pod๋ž€?Pod๋Š” ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค์—์„œ ์ƒ์„ฑํ•˜๊ณ  ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ€์žฅ ์ž‘์€ ๋ฐฐํฌ ๊ฐ€๋Šฅํ•œ ์ปดํ“จํŒ… ๋‹จ์œ„์ด๋‹ค.Pod๋Š” ๊ณต์œ  ์Šคํ† ๋ฆฌ์ง€ ๋ฐ ๋„ค.. 2024. 11. 25.
[k8s] Kubernetes ๊ตฌ์„ฑ ์š”์†Œ https://kubernetes.io/docs/concepts/overview/components/ Kubernetes ComponentsAn overview of the key components that make up a Kubernetes cluster.kubernetes.io๋ฒˆ์—ญ๋ณธ์˜ ๊ฒฝ์šฐ ๋น ์ง„ ๋‚ด์šฉ๋“ค๋„ ์žˆ์œผ๋ฏ€๋กœ ๋ฌธ์„œ๋ฅผ ๋ณผ ๋•Œ๋Š” ์˜๋ฌธ ๋ฒ„์ „์œผ๋กœ ๋ณด๊ธธ ์ถ”์ฒœํ•œ๋‹ค.์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ์ปดํฌ๋„ŒํŠธ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ๋Š” ์ปดํ“จํ„ฐ ์ง‘ํ•ฉ์ธ ๋…ธ๋“œ ์ปดํฌ๋„ŒํŠธ์™€ ์ปจํŠธ๋กค ํ”Œ๋ ˆ์ธ ์ปดํฌ๋„ŒํŠธ๋กœ ๊ตฌ์„ฑ๋œ๋‹ค.ํ•ต์‹ฌ ๊ตฌ์„ฑ์š”์†Œ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ๋Š” ์ปจํŠธ๋กค ํ”Œ๋ ˆ์ธ๊ณผ ํ•˜๋‚˜ ์ด์ƒ์˜ ์›Œํฌ ๋…ธ๋“œ๋“ค๋กœ ๊ตฌ์„ฑ๋œ๋‹ค.์ปจํŠธ๋กค ํ”Œ๋ ˆ์ธ์€ ์ „๋ฐ˜์ ์ธ ํด๋Ÿฌ์Šคํ„ฐ์˜ ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค.์›Œํฌ ๋…ธ๋“œ๋Š” ์‹คํ–‰ ์ค‘์ธ Pod๋ฅผ ์œ ์ง€ ๊ด€๋ฆฌํ•˜๋ฉฐ, ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๋Ÿฐํƒ€์ž„ ํ™˜๊ฒฝ์„ ์ œ๊ณตํ•œ๋‹ค. ํด๋Ÿฌ์Šคํ„ฐ๋Š” ๊ฐ ๋…ธ๋“œ์—.. 2024. 11. 24.
[k8s] Kubernetes๋ž€? https://kubernetes.io/ko/docs/concepts/overview/ ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋ž€ ๋ฌด์—‡์ธ๊ฐ€?์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋Š” ์ปจํ…Œ์ด๋„ˆํ™”๋œ ์›Œํฌ๋กœ๋“œ์™€ ์„œ๋น„์Šค๋ฅผ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ ์ด์‹ํ•  ์ˆ˜ ์žˆ๊ณ , ํ™•์žฅ ๊ฐ€๋Šฅํ•œ ์˜คํ”ˆ์†Œ์Šค ํ”Œ๋žซํผ์œผ๋กœ, ์„ ์–ธ์  ๊ตฌ์„ฑ๊ณผ ์ž๋™ํ™”๋ฅผ ๋ชจ๋‘ ์ง€์›ํ•œ๋‹ค. ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋Š” ํฌ๊ณ  ๋น ๋ฅด๊ฒŒ ์„ฑ์žฅํ•˜kubernetes.io๊ณต์‹ ์‚ฌ์ดํŠธ๋ฅผ ์ด์šฉํ•˜์—ฌ ์ •๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค.์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋ž€?์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋Š” ์ปจํ…Œ์ด๋„ˆํ™”๋œ ์›Œํฌ๋กœ๋“œ์™€ ์„œ๋น„์Šค๋ฅผ ๊ด€๋ฆฌํ•˜๊ธฐ ์œ„ํ•œ ์ด์‹์„ฑ์ด ์žˆ๊ณ , ํ™•์žฅ๊ฐ€๋Šฅํ•œ ์˜คํ”ˆ์†Œ์Šค ํ”Œ๋žซํผ์ด๋‹ค.์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋Š” ์„ ์–ธ์  ๊ตฌ์„ฑ๊ณผ ์ž๋™ํ™”๋ฅผ ๋ชจ๋‘ ์šฉ์ดํ•˜๊ฒŒ ํ•ด์ค€๋‹ค. ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค๋Š” ํฌ๊ณ , ๋น ๋ฅด๊ฒŒ ์„ฑ์žฅํ•˜๋Š” ์ƒํƒœ๊ณ„๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค.์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ์„œ๋น„์Šค, ๊ธฐ์ˆ  ์ง€์› ๋ฐ ๋„๊ตฌ๋Š” ์–ด๋””์„œ๋‚˜ ์‰ฝ๊ฒŒ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.์ฟ ๋ฒ„๋„คํ‹ฐ์Šค์˜ ์—ญ์‚ฌ์  ๋ฐฐ๊ฒฝ์ „ํ†ต์ ์ธ ๋ฐฐํฌ ์‹œ๋Œ€์ดˆ๊ธฐ ์กฐ์ง์€ ์• ํ”Œ.. 2024. 11. 16.
[k8s] Kubernetes ๋กœ๊ทธ - PLG ๊ฐœ์š” PLG๋ž€?PLG๋Š” Promtail + Loki + Grafana๋ฅผ ์ด์šฉํ•˜์—ฌ ๊ตฌ์„ฑํ•˜๋Š” ๋กœ๊ทธ ํ†ตํ•ฉ ์‹œ์Šคํ…œ์ด๋‹ค. ๊ฐ๊ฐ์˜ ์ด๋‹ˆ์…œ์„ ๋”ฐ์„œ PLG๋ผ๊ณ  ํ•œ๋‹ค. EFK/ELK์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋กœ๊ทธ๋ฅผ ์ˆ˜์ง‘, ์ €์žฅ, ๋ถ„์„ํ•˜๊ณ  ์‹œ๊ฐํ™”ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” ์˜คํ”ˆ ์†Œ์Šค ์Šคํƒ์ด๋‹ค.Promtail์ด๋ž€?Promtail์€ ๋กœ์ปฌ ๋ฐ์ดํ„ฐ์˜ ๋‚ด์šฉ์„ Grafana Loki ์ธ์Šคํ„ด์Šค๋‚˜ Grafana Cloud๋กœ ์ „๋‹ฌํ•˜๋Š” ์—์ด์ „ํŠธ์ด๋‹ค. Promtail์€ ์ถ”์ ํ•˜๊ณ ์ž ํ•˜๋Š” ๋ชจ๋“  ๋…ธ๋“œ ์œ„์—์„œ Daemonset์œผ๋กœ ์‹คํ–‰๋œ๋‹ค. ๋กœ๊ทธ ์ŠคํŠธ๋ฆผ์— ๋ผ๋ฒจ์„ ๋ถ€์ฐฉํ•˜๊ณ  ์ด๋ฅผ Loki ์ธ์Šคํ„ด์Šค๋กœ ์ „๋‹ฌํ•œ๋‹ค. Promtail์€ ๋กœ์ปฌ ๋กœ๊ทธ ํŒŒ์ผ๊ณผ systemd journal์—์„œ ๋กœ๊ทธ๋ฅผ ์ถ”์ ํ•œ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์•„๋ž˜ ์‚ฌ์ดํŠธ๋ฅผ ์ฐธ๊ณ ํ•˜๋ฉด ๋œ๋‹ค. Promtail agent | Grafan.. 2024. 11. 4.
[k8s] Kubernetes ๋กœ๊ทธ - PLG ๊ตฌ์ถ• PLG๋ฅผ ์„ ํƒํ•œ ์ด์œ ํ”„๋กœ์ ํŠธ ์ง„ํ–‰ ์ค‘ EFK์—์„œ slack์œผ๋กœ ์•Œ๋ฆผ์„ ์—ฐ๋™ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” security ์„ค์ •์„ ์ตœ๊ณ ๋กœ ๋†’์—ฌ ์ฒดํ—˜ํŒ์„ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ ๋ˆ ๋‚ด๊ณ  ์‚ฌ์šฉํ•ด์•ผํ–ˆ๋‹ค. ์ด ๊ณผ์ •์—์„œ security ์„ค์ •์— ์–ด๋ ค์›€์„ ๊ฒช์œผ๋ฉฐ ๋งˆ์นจ ๋ชจ๋‹ˆํ„ฐ๋ง์œผ๋กœ prometheus์™€ grafana๋ฅผ ์‚ฌ์šฉํ•˜์˜€๊ธฐ ๋•Œ๋ฌธ์— PLG๋กœ ๋ณ€๊ฒฝํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค.Helm์„ ์ด์šฉํ•œ PLG ๊ตฌ์ถ•์•ž์„œ ์ž‘์„ฑํ•œ EFK๋Š” Fluent Bit๋งŒ Helm์„ ์ผ์ง€๋งŒ PLG๋Š” Promtail, Loki, Grafana ๋ชจ๋‘ helm์œผ๋กœ ์ง„ํ–‰ํ•˜๊ฒ ๋‹ค.๋จผ์ € PLG๋ฅผ ๊ตฌ์ถ•ํ•  namespace๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.$ kubectl create namespace monitoringgrafana helm chart๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.$ helm repo add grafana https://graf.. 2024. 11. 4.
728x90
๋ฐ˜์‘ํ˜•