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
정리합니다.
'IT Knowledge > Kubernetes' 카테고리의 다른 글
x509: certificate signed by unknown authority (set insecure registries) (0) | 2021.12.24 |
---|---|
failed to pull image k8s.gcr.io (Proxy Setting) (0) | 2021.12.24 |
Kubernetes CNI(Calico) 설치 방법 (0) | 2021.12.15 |
Kubernetes Cluster 구축(CentOS, CRI-O) Step.3 (0) | 2021.12.15 |
Kubernetes Cluster 구축(CentOS, CRI-O) Step.2 (0) | 2021.12.15 |
댓글