Failed to create pod sandbox: open /run/systemd/resolve/resolv.conf: no such file or directory

이슈

Failed to create pod sandbox: open /run/systemd/resolve/resolv.conf: no such file or directory

Master Node는 Ubuntu를 사용하고 있고 Master Slave는 Debian으로 설치된 상태에서 K8S를 Init, Join하였다.
Ubuntu와 다르게 Debian은 기본 세팅이 조금 친절하지 않았다.
새로 설치하기도 하고 여러 시행착오를 거처 이슈를 다음과 같이 해결하였다.

  1. K8S 버전을 Master와 Slave, Worker 모두 같은 버전으로 통일
  2. /run/systemd/resolve 디렉터리 생성
  3. /run/systemd/resolve 디렉터리에 /etc/resolv.conf 파일 링크 걸어주기
  4. deamon reload, systemctl restart
sudo mkdir -p /run/systemd/resolve
sudo ln -s /etc/resolv.conf /run/systemd/resolve/resolv.conf
sudo systemctl daemon-reload
sudo systemctl restart kubelet.service containerd.service

Leave a Comment