Publishing images to ECR with Rancher2

Firstly, sorry if this question has been asked before.

I have an EKS cluster with rancher2 installed, IAM policies and users setup and can easily pull and deploy images on ECR.

I am currently working on CI/CD whereby my steps are

  • Do tests
  • Prep image for publish
  • Publish image to ECR
  • Deploy the image to the app.

However, Seeing as I have added the ecr registry and left the username and password empty(As it is managed by kube per image pulls)

I get the error of “No username or password, activating guest mode”

I then via the api manually set the username and password to "" and saved though now I get no basic auth credentials

What is the correct way to publish images to ECR if I have everything set up correctly to pull them?