개발

Found 2 pods, using pod/my-springboot-dm-794f6cc79c-dj9htError from server (BadRequest): container "my-springboot-app" in pod "my-springboot-dm-794f6cc79c-dj9ht" is waiting to start: image can't be pulled

시간의 효율화 2022. 3. 25. 00:36

Kubernetes에 이전 pod를 삭제하고, 새 이미지를 푸쉬한 후 다시 pod를 생성하려니 다음과 같은 에러가 떴다. 

 

Found 2 pods, using pod/my-springboot-dm-794f6cc79c-dj9ht
Error from server (BadRequest): container "my-springboot-app" in pod "my-springboot-dm-794f6cc79c-dj9ht" is waiting to start: image can't be pulled

 

 

imagePullPolicy: Never 문구를 다음과 같은 위치에 추가해주니 되었다. 

apiVersion: v1
kind: Pod
metadata:
  name: local-image-test
spec:
  containers:
  - name: local-image-container
    image: local-image:latest
    imagePullPolicy: Never

출처: https://stackoverflow.com/questions/50739405/docker-for-mac-kubernetes-reference-local-image/52763242#52763242