I am running grafana (kiali, prometheus and tracing too) inside an Azure Kubernetes Cluster (AKS). The AKS cluster is behind an Application Gateway Ingress Controller (AGIC) the grafana pod is running in a subpath like https://{domain}/grafana/. I am able to hit the grafana service through an ingress of AGIC bit the grafana pod keeps searching for resources in https://{domain}/ and not in https://{domain}/grafana/. So, I would like to change the propertie root_url in grafana.ini in order to solve the problem. How could I achieve this?
I am installing istio 1.6 in AKS with the command:
istioctl manifest apply -f istio.aks.yaml
My IstioControlPlane looks like below:
apiVersion: install.istio.io/v1alpha2
kind: IstioControlPlane
spec:
# Use the default profile as the base
# More details at: https://istio.io/docs/setup/additional-setup/config-profiles/
profile: default
components:
pilot:
k8s:
resources:
requests:
cpu: 10m # override from default 500m
memory: 40Mi # ... default 2048Mi
values:
global:
# Ensure that the Istio pods are only scheduled to run on Linux nodes
defaultNodeSelector:
beta.kubernetes.io/os: linux
# Enable mutual TLS for the control plane
controlPlaneSecurityEnabled: true
mtls:
# Require all service to service communication to have mtls
enabled: false
grafana:
# Enable Grafana deployment for analytics and monitoring dashboards
enabled: true
security:
# Enable authentication for Grafana
enabled: false
kiali:
# Enable the Kiali deployment for a service mesh observability dashboard
enabled: true
resources:
requests:
cpu: 2m # override from default 500m
tracing:
# Enable the Jaeger deployment for tracing
enabled: true
jaeger:
resources:
requests:
cpu: 2m # override from default 500m
gateways:
istio-ingressgateway:
enabled: false
prometheus:
enabled: true
resources:
requests:
cpu: 2m # override from default 500m
The grafana web page at https://{domain}.com/grafana/ returns the error in the image below:
Since you are deploying Grafana using the ItsioControlPlane CRD, you should be able to update the manifest by updating the following ENV variable.
grafana:
env:
GF_SERVER_ROOT_URL: '%(protocol)s://%(domain)s:/grafana'
this will allow you to change its ROOT URL and have it properly served behind an Azure AppGW
This is available since all of the itsio HelmChart configurations are mapped in the CRD
https://istio.io/latest/blog/2019/introducing-istio-operator/#migration-from-helm
You can also set Helm configuration values in an IstioControlPlane custom resource. See Customize Istio settings using Helm for details.