I have done a kubernetes bare metal deployment. In which I have to go to every worker-node and configure awscli and ECR login. Can we have solution using kubernetes where we can get the aws configure for all the worker node and login ecr .
The thing you are looking for is --cloud-provider=aws and its --cloud-config=/etc/kubernetes/cloud.conf friend; when those are passed into kube-apiserver, kube-controller-manager, and kubelet, they will configure themselves to be able to authenticate to ECR, provided the Node's IAM Instance Profile allows it
Be careful: you'll see a lot of noise about --cloud-provider=external and running the cloud-provider-aws outside of kube-controller-manager, but that story is not as happy shiny as they make it seem and I personally have yet to make cloud-provider=external work correctly whereas setting --cloud-provider=aws works perfectly