Hello @AKS-User ,
I understand you are using Harbor registry https://github.com/goharbor/harbor
After a thorough research, I find daemonsets to be the way here because we don't provide OOB solutions for 3rd party CRs (except for docker hub I think).
This is a Kubernetes DaemonSet definition that will install a custom certificate on the nodes and restart containerd. This is useful if your private registry is protected using a self-signed certificate. Not tested in production. · GitHub
Example for hosts file: KQ - How to update worker nodes /etc/hosts file in GKE (kubernetesquestions.com)
Let me know if you have any queries around this, if this doesn't work, please respond back on this answer by adding a new comment.