728x90
๐จ Error
# ์ถ๋ ฅ
...
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
NetworkUnavailable False Mon, 06 Jan 2025 11:16:31 +0000 Mon, 06 Jan 2025 11:16:31 +0000 FlannelIsUp Flannel is running on this node
MemoryPressure False Thu, 23 Jan 2025 04:29:31 +0000 Mon, 06 Jan 2025 11:15:42 +0000 KubeletHasSufficientMemory kubelet has sufficient memory available
DiskPressure False Thu, 23 Jan 2025 04:29:31 +0000 Thu, 23 Jan 2025 04:04:01 +0000 KubeletHasNoDiskPressure kubelet has no disk pressure
PIDPressure False Thu, 23 Jan 2025 04:29:31 +0000 Mon, 06 Jan 2025 11:15:42 +0000 KubeletHasSufficientPID kubelet has sufficient PID available
Ready True Thu, 23 Jan 2025 04:29:31 +0000 Mon, 06 Jan 2025 11:16:29 +0000 KubeletReady kubelet is posting ready status
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FreeDiskSpaceFailed 51m kubelet Failed to garbage collect required amount of images. Attempted to free 1731492249 bytes, but only found 0 bytes eligible to free.
Warning FreeDiskSpaceFailed 46m kubelet Failed to garbage collect required amount of images. Attempted to free 2140416409 bytes, but only found 0 bytes eligible to free.
Warning ImageGCFailed 46m kubelet Failed to garbage collect required amount of images. Attempted to free 2140416409 bytes, but only found 0 bytes eligible to free.
Warning ImageGCFailed 41m kubelet Failed to garbage collect required amount of images. Attempted to free 1884924313 bytes, but only found 0 bytes eligible to free.
Normal NodeHasDiskPressure 34m (x11 over 8d) kubelet Node <node-name> status is now: NodeHasDiskPressure
Warning EvictionThresholdMet 34m (x25 over 8d) kubelet Attempting to reclaim ephemeral-storage
Warning ImageGCFailed 31m kubelet Failed to garbage collect required amount of images. Attempted to free 1867794841 bytes, but only found 0 bytes eligible to free.
Warning FreeDiskSpaceFailed 31m kubelet Failed to garbage collect required amount of images. Attempted to free 1867794841 bytes, but only found 0 bytes eligible to free.
Normal NodeHasNoDiskPressure 29m (x12 over 15d) kubelet Node <node-name> status is now: NodeHasNoDiskPressure
Warning FreeDiskSpaceFailed 26m kubelet Failed to garbage collect required amount of images. Attempted to free 1872329113 bytes, but only found 0 bytes eligible to free.
Warning ImageGCFailed 26m kubelet Failed to garbage collect required amount of images. Attempted to free 1872329113 bytes, but only found 0 bytes eligible to free.
Warning FreeDiskSpaceFailed 113s (x271 over 4d5h) kubelet (combined from similar events): Failed to garbage collect required amount of images. Attempted to free 1898916249 bytes, but only found 0 bytes eligible to free.
- DiskPressure ๊ด๋ จ ์๋ฌ์ ๋ํ ํ ์คํธ ์ค ๋ฐ์ํ ๋ฌธ์ ์ด๋ค.
- Kubernetes๋ ํ๋์์ ์ด์ฉํ ์ปจํ
์ด๋๋ฅผ ์ํ ์์ ์ ์ฅ์์ธ ephemeral-storage๋ฅผ ํ์ฉํ๋ค.
- ephemeral-storage๋ ์ด์ฉ ์ค์ธ ์ปจํ ์ด๋๊ฐ ์ผ์์ ์ผ๋ก ์ฌ์ฉํ๋ ์ ์ฅ ๊ณต๊ฐ์ด๋ค.
- ๋ฐ๋ผ์ Pod๋ฅผ ๋์ฐ๊ธฐ ์ํด์๋ ์ปจํ ์ด๋ ์์ ์ ์ฅ์๋ก ์ฌ์ฉํ ์ฌ์ ๋์คํฌ ๊ณต๊ฐ์ ํ์๋ก ํ๋ค.
- ๊ทธ๋ฐ๋ฐ, ์ด ephemeral-storage๋ก ์ฌ์ฉํ ๋์คํฌ ๊ณต๊ฐ์ด ๋ถ์กฑํ๋ฉด DiskPressure ์ํ๊ฐ True๊ฐ ๋์ด ํด๋น ์ธ์คํด์ค(์์ปค ๋
ธ๋)์ ํ๋๋ฅผ ์คํ์ํค์ง ๋ชปํ๋ค.
- ์ ํํ๋ ์ธ์คํด์ค์ ๋์คํฌ ์ฉ๋์ด 90%๋ฅผ ๋์ด๊ฐ๊ฑฐ๋(๋ ธ๋ ์์คํ ๊ฐ์ฉ ์ฉ๋), ์ด๋ฏธ์ง ์์คํ ๊ฐ์ฉ ์ฉ๋(85%)์ ๋๊ธฐ๋ฉด DiskPressure๊ฐ true๋ก ๋ณ๊ฒฝ๋๋ค.
- ์ด ์ํ์์ ๋ฉ์ถ์ง ์๊ณ ๊ณ์ Pod ์์ฑ์ ์๋ํ๊ฒ ๋๋ฉด ImageGCFailed๋ผ๋ ์ด์ ๋ก Failed to garbage collect required amount of images.์ ๊ฐ์ ๋ฉ์์ง์ ์๋ฌ๊ฐ ๋ฐ์ํ๊ฒ ๋๋ค.
- ๊ทธ๋ฐ๋ฐ DiskPressure๊ฐ False๋ก ๋์์๋ ๊ณ์ ์ด ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ค.
- ์ด ๋ฌธ์ ๋ ์ ๋ฐ์ํ๋ ๊ฒ์ผ๊น?
๐ก ์ฟ ๋ฒ๋คํฐ์ค์ ๊ฐ๋น์ง ์ปฌ๋ ์
- ์ฟ ๋ฒ๋คํฐ์ค์ ๊ฐ๋น์ง ์ปฌ๋ ์ (Garbage Collection)์ JVM์ ๊ฐ๋น์ง ์ปฌ๋ ์ ๊ณผ ๊ฐ์ด ๋ ์ด์ ํ์ํ์ง ์์ ๋ฆฌ์์ค๋ฅผ ์๋์ผ๋ก ์ ๋ฆฌํด์ฃผ๋ ๊ธฐ๋ฅ์ด๋ค.
- ์ด๋ฅผ ํตํด ํด๋ฌ์คํฐ ๋ด ๋ถํ์ํ ๋ฐ์ดํฐ๋ฅผ ์ค์ด๊ณ ๋ฆฌ์์ค๋ฅผ ํจ์จ์ ์ผ๋ก ๊ด๋ฆฌํ ์ ์๋ค.
๐ค ์ข ๋ฅ
์ค๋ธ์ ํธ ๊ฐ๋น์ง ์ปฌ๋ ์
- ์์ ์-์ข
์์ ๊ด๊ณ๊ฐ ์๋ ๊ฒฝ์ฐ, ์์ ์(Owner)๊ฐ ์ญ์ ๋๋ฉด ์ข
์์(Dependent)๋ ์๋์ผ๋ก ์ญ์ ๋๋ค.
- ์๋ฅผ ๋ค์ด, Deployment๊ฐ ์ญ์ ๋๋ฉด ๊ด๋ จ๋ ReplicaSet๊ณผ Pod๋ ์ญ์ ๋๋ค.
์ปจํ ์ด๋ ๊ฐ๋น์ง ์ปฌ๋ ์
- ์ฌ์ฉ๋์ง ์๋ ์ปจํ ์ด๋ ์ด๋ฏธ์ง๋ ์ค์ง๋ ์ปจํ ์ด๋๋ฅผ ์ญ์ ํ๋ค.
- ์ด๋ฅผ ํตํด ๋ ธ๋์ ๋์คํฌ ๊ณต๊ฐ์ ํ๋ณดํ๋ค.
๐ ์์ํ๋ ์๋ฌ ๋ฐ์ ๊ณผ์
1. ๋์คํฌ ์ฉ๋ ๋ถ์กฑ ๋ฌธ์ ๋ก DiskPressure ๋ฌธ์ ๋ฐ์
2. ์ฌ์ฉ์๊ฐ ์ง์์ ์ผ๋ก ๋์ผ ๊ธฐ๋ฅ์ Pod ์์ฑ ์๋(๋์ผ ์ด๋ฏธ์ง ์ฌ์ฉ)
3. ํน์ or ๋ค์์ Pod์ Error ๋ฐ์, ๋ณต๊ตฌ ๋ถ๊ฐ
4. ๋ณต๊ตฌ ๋ถ๊ฐ Pod๊ฐ Kubelet์ ์ํด ๊ณ ์ Pod๋ก ์ธ์๋์ด ํด๋น Pod์์ ์ฌ์ฉ ์ค์ธ ์ปจํ ์ด๋ ์ด๋ฏธ์ง๋ฅผ ๊ฐ๋น์ง ์ปฌ๋ ์ ์ด ์ ๋ฆฌ ์๋.
5. ๊ทธ๋ฌ๋, ์คํ ์ค์ธ ๋ค๋ฅธ Pod์์ ๊ฐ์ ์ด๋ฏธ์ง๋ฅผ ์ฌ์ฉ ์ค์ด๊ธฐ ๋๋ฌธ์ ๊ฐ๋น์ง ์ปฌ๋ ์ ์ ์ํ ์ด๋ฏธ์ง ์ ๋ฆฌ ๋ฐ ์ฉ๋ ํ๋ณด ์คํจ
6. ImageGCFailed, FreeDiskSpaceFailed ์๋ฌ ๋ฐ์
๐ฅธ ๊ฒฐ๋ก
- ์ ๋ฆฌํ๋ฉด ๋ค์๊ณผ ๊ฐ๋ค.
- ImageGCFailed, FreeDiskSpaceFailed๋ ํน๋ณํ ์ด์ ๋ก ์ธํด ๋ฐ์ํ ๊ฒ์ด ์๋ ๋์ผํ ์ด๋ฏธ์ง๋ฅผ ํ์ฉํ์ฌ ์ง์์ ์ผ๋ก Pod๋ฅผ ์์ฑํ์ ๋ ๋ฐ์ํ ์ ์๋ค.
- ์๋ฅผ ๋ค์ด, ์ง์์ ์ผ๋ก ์์ฑํ Pod๊ฐ RepicaSet, Deployment ๋ฑ์ ๋ฆฌ์์ค์ ๊ด๋ฆฌ๋์ง ์๋๋ค๋ฉด ์์ฑ๋ Pod ์ค ์ผ๋ถ์ ๋ฌธ์ ๊ฐ ์๊ฒจ ๋์ ์๋ฌ๊ฐ ๋ฐ์ํ์ ๋ ํด๋น Pod๋ ๊ณ ์ Pod๊ฐ ๋์ด๋ฒ๋ฆฐ๋ค.
- ์ด๋ ๊ฐ๋น์ง ์ปฌ๋ ์ ์ ์ํด ํด๋น Pod์ ์ด๋ฏธ์ง๊ฐ ์ฌ์ฉ ์ค์ด ์๋ ๊ฒ์ผ๋ก ์ธ์๋์ด ์ ๋ฆฌ๋๋ ค๊ณ ํ ๊ฒ์ด๋ค.
- ๊ทธ๋ฌ๋, ์คํ ์ค์ธ ๋ค๋ฅธ Pod์์ ํด๋น ์ด๋ฏธ์ง๋ฅผ ์ฌ์ฉ ์ค์ด๊ธฐ ๋๋ฌธ์ ImageGCFailed, FreeDiskSpaceFailed ์๋ฌ๊ฐ ๋ฐ์ํ๋ ๋ฏํ๋ค.
728x90