Reconfigure azure managed prometheus for aks container

121 Views Asked by At

aks cluster is in Resource Group RG1.
I configured insights, azure-managed prometheus and azure-managed grafana in RG2.
I then wanted to move prometheus and grafana in RG1, same as aks cluster.

in between, I deleted all resources and RG2 altogether.
I created a new prometheus in RG1, not linked yet to any aks.

I want to edit prometheus configuration for aks to now point to new prometheus but i cant find any way to update aks monitoring to point to new prometheus in RG1 while it still points to old prometheus of RG2 even though old prometheus and RG2 itself are deleted.

I tried disabling monitoring for aks but it still points to old prometheus.

1

There are 1 best solutions below

0
Nikhil Sharma On

Disable Insights with:

az aks disable-addons -a monitoring -n <Cluster> -g <ClusterRG>

Disable Prometheus for AKS:

az aks update --disable-azure-monitor-metrics -n <cluster-name> -g <cluster-resource-group> 
az k8s-extension delete --name azuremonitor-metrics --cluster-name <cluster-name> --resource-group <cluster-resource-group> --cluster-type connectedClusters

Reference