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

Kubernetes8

[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/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.
[k8s] kind๋กœ Kubernetes ์‹ค์Šต ํ™˜๊ฒฝ ๊ตฌ์„ฑํ•˜๊ธฐ Kind๋ž€?Kind๋Š” ๋กœ์ปฌ ์ปดํ“จํ„ฐ ํ™˜๊ฒฝ์— ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ์†์‰ฝ๊ณ  ๋น ๋ฅด๊ฒŒ ์„ค์น˜ํ•˜๊ธฐ ์œ„ํ•ด ๋งŒ๋“ค์–ด์ง„ ๋„๊ตฌ์ž…๋‹ˆ๋‹ค.Kind๋Š” Go ์–ธ์–ด๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๋งŒ๋“ค์–ด์กŒ์œผ๋ฉฐ, Docker์ด๋ฏธ์ง€๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ kubeadm์„ ์ด์šฉํ•˜์—ฌ ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๋ฐฐํฌํ•ฉ๋‹ˆ๋‹ค.์ž์„ธํ•œ ๋‚ด์šฉ์€ ์œ„ ์ด๋ฏธ์ง€๋ฅผ ํ†ตํ•ด kind ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์—์„œ ํ™•์ธํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.Kind ์„ค์น˜ํ•˜๊ธฐ์„ค์น˜ ๊ฐ€์ด๋“œ ์›๋ณธ URL : https://kind.sigs.k8s.io/docs/user/quick-start/#installationMacOSbrew install kindWindowschoco install kindLinuxcurl.exe -Lo kind-windows-amd64.exe https://kind.sigs.k8s.io/dl/v0.15.0/kind-windows-amd.. 2024. 10. 21.
728x90
๋ฐ˜์‘ํ˜•