마구잡

POD 이미지 pull rate limit 늘리기 본문

Kubernetes

POD 이미지 pull rate limit 늘리기

MAGUJOB 2023. 11. 24. 16:29
반응형

개요

다른 클러스터가 묶인 네트워크 환경에서 운영하다보니 새로운 이미지를 가져와야하는 POD가 지속적으로 제한에 걸려

개인 도커허브 계정을 containerd config.toml에 도커 허브 계정을 지정하여 6시간 제한 횟수를 100 -> 200 으로 늘려준다.

 

https://hub.docker.com/billing/plan/update

 

Docker

 

hub.docker.com

 

아래와 같이 too many requests 가 나오는 상황

[root@geon-mn1 docker]# crictl pull docker.io/library/busybox:latest
E1124 16:16:41.001708  790767 remote_image.go:171] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"docker.io/library/busybox:latest\": failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/busybox/manifests/sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit" image="docker.io/library/busybox:latest"
FATA[0005] pulling image: rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/library/busybox:latest": failed to copy: httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/library/busybox/manifests/sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

 

방법

1. 도커 허브 계정 생성

https://hub.docker.com/

 

Docker Hub Container Image Library | App Containerization

Build and Ship any Application Anywhere Docker Hub is the world's easiest way to create, manage, and deliver your team's container applications. Create your account Signing up for Docker is fast and free. Continue with GoogleContinue with GitHubContinue wi

hub.docker.com

2. /etc/containerd/config.toml 수정 ( 위치는 상관 없습니다.)

...
154
155       [plugins."io.containerd.grpc.v1.cri".registry.configs."registry-1.docker.io".auth]
156       username = "도커 허브 계정"
157       password = "도커 허브 패스워드"
158
...

 

3. 데몬 재시작

[root@geon-mn1 docker]# systemctl restart containerd.service

 

4. 이미지 다시 pull

[root@geon-mn1 docker]# crictl pull docker.io/library/busybox:latest
Image is up to date for sha256:a416a98b71e224a31ee99cff8e16063554498227d2b696152a9c3e0aa65e5824

 


이 방법 또한 200회가 다 끝나면 소용이 없긴 하지만 사설 네트워크 안에 여러 클러스터가 있을 경우 이미지 pull 횟수가 

급격하게 소모되기 때문에 계정하나만 넣어줘도 6시간 200회면 넉넉하게 사용할 수 있다.

반응형

'Kubernetes' 카테고리의 다른 글

Harbor Image Size 체크 스크립트  (0) 2024.01.30
NFS 2/3 버전의 스토리지 클래스 PVC 생성 불가 현상  (2) 2023.11.24
kubelet 데몬 동작  (1) 2023.11.24
containerd 다운그레이드  (3) 2023.11.21
POD netns 보기  (4) 2023.11.21