[k8s] Error: failed to run Kubelet: running with swap on is not supported
์ฟ ๋ฒ ํด๋ฌ์คํฐ๋ฅผ ์ค์ ํ๋ค๋ณด๋ฉด ์ด๋ฐ ์ค๋ฅ๋ฅผ ๋ชฉ๋ํ ์๊ฐ ์๋ค.
Error: failed to run Kubelet: running with swap on is not supported
์ค์์ ์ง์ํ์ง ์๋๋ค๋ ๊ฒ์ด๋ค.
์ค์์ ์ฐ๋ฆฌ๊ฐ ์๋ ์ค์์ด ๋ง๋ค. ๋์คํฌ๋ฅผ ๋ฉ๋ชจ๋ฆฌ์ฒ๋ผ ์ฐ๋ ์ค์ ๋ฉ๋ชจ๋ฆฌ ๋ง์ด๋ค.
์ฟ ๋ฒ๋ ๊ธฐ๋ณธ์ ์ผ๋ก ์ค์์ ๋ํ ๊ธฐ๋ฅ์ ์ง์ํ์ง ์๊ธฐ ๋๋ฌธ์, ๋ฐ๋ก ๊บผ์ค์ผ ํ๋ค. ๊ทธ๊ฒ ๊ถ์ฅ์ฌํญ์ด๋ค.
์ค์์ ์ฐ๋ฉด ์ฑ๋ฅ์ ๋ํ ๋ณด์ฅ๋ ์๋๊ณ , ์ค์๋๊ฐ ๋ฎ๊ธฐ ๋๋ฌธ์ ์ฟ ๋ฒ ํ์์๋ ๊ตณ์ด ๊ตฌํํ๋ ค ๋ค์ง ์์๋ค๊ณ ํ๋ค.
1.28๋ถํฐ๋ ๋ฒ ํํ ์คํธ๋ก ์ค์์ ์ง์ํ๋, ์ ์ ๊ธฐ๋ฅ์ด๋ผ ํ๊ธฐ๋ ์ด๋ ต๋ค.
์๋ฌดํผ ๊ทธ๋ฅ ์ค์์ ๋๋ ค๋ฉด ์ด๋ ๊ฒ ๋๋ฉด ๋๋ค.
sudo swapoff -a
๊ทธ๋ฌ๋ฉด ์๋ํ ๊ฒ์ด๋ค.
๊ทผ๋ฐ ์ ๊ฑด ์ปดํจํฐ๋ฅผ ์ฌ๋ถํ
ํ๋ฉด ๋ค์ ํ์ฑํ๋ ์ ์๋ค.
๊ฐ์ฅ ์ข์ ์ง์์ ์ธ ์๋ฃจ์
์ ์๋ ํ์ผ์ ์์ ํด์
sudo vi /etc/fstab

์ ๊ฑธ ๊ฐ๋ฆฌ๋ ๊ฒ์ด๋ค.
์ฐธ์กฐ
https://github.com/kubernetes/kubeadm/issues/610
https://stackoverflow.com/questions/47094861/error-while-executing-and-initializing-kubeadm
https://my-grope-log.tistory.com/30