Skip to content

when apply deployment on eks ,got error “failed to get sandbox image”

0

when update deployment on eks(1.30) ,apply failed:Failed to create pod sandbox: rpc error: code = Unknown desc = failed to get sandbox image ".dkr.ecr.us-west-1.amazonaws.com/eks/pause:3.5": failed to pull image ".dkr.ecr.us-west-1.amazonaws.com/eks/pause:3.5": failed to pull and unpack image ".dkr.ecr.us-west-1.amazonaws.com/eks/pause:3.5": failed to resolve reference ".dkr.ecr.us-west-1.amazonaws.com/eks/pause:3.5": pull access denied, repository does not exist or may require authorization: authorization failed: no basic auth credentials

AWS
SUPPORT ENGINEER

asked 2 years ago1.4K views

1 Answer
0
Accepted Answer

Because containerd cannot obtain the ECR credentials to pull the sandbox container image. You can run

systemctl restart sandbox-image

to trigger the pull, but you still need to investigate why the image was removed. For example, possible reasons:

  1. Use a custom script that runs on each node to clean up unused images on the node and exit the container, this will also delete the pause image on the node. The script can be modified to exclude some images on the node.
  2. Use a command like crictl rmi --prune to manually delete the image. Avoid similar operations and leave it to kubelet for image recycling.

The kubelet will perform garbage collection on unused images every two minutes and garbage collection on unused containers every minute. You should avoid using external garbage collection tools, as external tools may break the kubelet's behavior and remove containers that should be retained.

AWS
SUPPORT ENGINEER

answered 2 years ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.