After following the thread Configuring external promethrus and grafana - #3 by tihomir
This issue is now resolved. The issue was because of upgrade from 1.12 to 1.17 and since server_configmap.yaml is different in both, hence the metric port was not exposed.