I created a private docker registry using AWS ECR. I want to use it with a Kubernetes cluster managed by Rancher, but the password to the registry is changed by AWS every 12 hours. How do I keep it updated as a secret in the cluster?
I created a private docker registry using AWS ECR. I want to use it with a Kubernetes cluster managed by Rancher, but the password to the registry is changed by AWS every 12 hours. How do I keep it updated as a secret in the cluster?
The easiest way to create and update a docker-registry secret in Rancher 2.x for an AWS ECR repo is to set up a CRON job that uses the AWS CLI and Kubectl.
kubectl get pods
to make sure it's all good.The secret will show up in the default project for the cluster and will be used anytime Kubernetes wants to do something related to your ECR registry.