컨테이너 런타임별 Proxy 설정방법(CRI-O, containerd)
Kubernetes 를 설치하면서, 컨테이너 런타임별로 Proxy를 설정하는 방법에 대해 작성합니다.
예시 Proxy : http://example.proxy.co.kr:3128
[Yum Proxy 설정]
설정파일 위치 : /etc/yum.conf
설정 추가 : proxy=http://example.proxy.co.kr:3128
[CRI-O Proxy 설정]
sudo mkdir -p /etc/systemd/system/crio.service.d
Create a file http-proxy.conf
cat /etc/systemd/system/crio.service.d/http-proxy.conf
[Service]
Environment=”HTTP_PROXY=http://example.proxy.co.kr:3128"
Environment=”HTTPS_PROXY=http://example.proxy.co.kr:3128"
Restart the crio daemon
systemctl daemon-reload
systemctl restart crio
[Containerd Proxy 설정]
sudo mkdir -p /etc/systemd/system/containerd.service.d
Create a file http-proxy.conf
cat /etc/systemd/system/containerd.service.d/http-proxy.conf
[Service]
Environment=”HTTP_PROXY=http://example.proxy.co.kr:3128"
Environment=”HTTPS_PROXY=http://example.proxy.co.kr:3128"
Restart the containerd daemon
systemctl daemon-reload
systemctl restart containerd
[Docker Proxy 설정]
sudo mkdir -p /etc/systemd/system/docker.service.d
create a file /etc/systemd/system/docker.service.d/http-proxy.conf
cat /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment=”HTTP_PROXY=http://example.proxy.co.kr:3128"
Environment=”HTTPS_PROXY=http://example.proxy.co.kr:3128"
Restart the docker daemon
systemctl daemon-reload
systemctl restart docker
정리합니다.