Using AWS Elastic Container Registry with AWS EKS
Using public images stored in Docker Hub is fine for some applications, but for more sensitive applications, you might want to store your Docker containers in a private Docker registry. AWS provides just such a registry: Elastic Container Registry (ECR). You can read more about the basics of ECR on the main product website at https://aws.amazon.com/ecr/.
In order to get a Kubernetes cluster to use images from a private repository, you must configure the cluster with the right credentials so that it can pull images from the repository. The process for most repositories is in the Kubernetes documentation at https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/.
However, AWS ECR uses an enhanced security system that relies on AWS IAM to grant temporary access tokens that are used to authenticate with ECR. Kubernetes has built-in support for this authentication process, as described in the documentation...