Had to follow the following steps to get this resolved. First do all the steps from https://learn.microsoft.com/en-us/azure/aks/ingress-basic?tabs=azure-cli. Then follow the steps at https://learn.microsoft.com/en-us/azure/aks/ingress-tls?tabs=azure-cli. For troubleshooting certificate manager issues, refer https://cert-manager.io/docs/troubleshooting/acme/.
If there are some issues with Cert Manager, delete it and reinstall in again.