Enable SMTP in Grafana using Helm Charts in Kubernetes cluster(EKS)
Helm charts of most of the well-known opensource projects are kind of overwhelming at first glance. But they are made so that we can provide all the configuration while deploying, there is no need to edit docker or change anything just setup configuration. In this post, we will go through the setup of Gmail SMTP notification in grafana.

We will deploy the helm chart from the official repo http://grafana.github.io/helm-chart
Before we start make sure you have the following dependencies things:
- helm
- kubectl
- Kubernetes cluster(minikube, kind, or any cloud provider) I am gonna use EKS.
Note: To setup minikube locally follow Link
Let's start first we need to import the helm chart using the following command
helm repo add grafana https://grafana.github.io/helm-charts
For setting up email notifications you need a Gmail account with 2FA enabled so that we can create an app password.
First let's enable IMAP in your Gmail account:
- Go to Gmail → See All Settings

- Now enable IMAP → Hit save

- Now go to the Google Account Setting → Security [https://myaccount.google.com/security?hl=en]
- Click App Password (make sure you have 2fa on or you will not see this option)

- Create an app password, Select App: Mail and Device: Others and click generate. It will give you a 16-letter password.
Lets deploy our grafana now
Now let's create overider_values.yaml
please fill update your password and user.
env:
GF_SMTP_ENABLED: "true"
GF_SMTP_HOST: "smtp.gmail.com:465"
GF_SMTP_PASSWORD: "qqqquuuuiiiioooo" #16 digit 2FA AppPassword
GF_SMTP_USER: "youremail@gmail.com"
GF_SMTP_FROM_ADDRESS: "youremail@gmail.com"
GF_SMTP_FROM_NAME: "Grafana"
- Create a namespace for your deployment
kubectl create namespace grafana
- Now lets deploy the helm charts
helm install grafana grafana/grafana
--namespace grafana \
--set persistence.storageClassName="gp2" \
--set persistence.enabled=true
--set adminPassword=admin \
--set service.type=LoadBalancer \
--values ./override_values.yaml
This will deploy our grafana and create the following resources.

Now let's test it.
- Open grafana dashboard using the external IP (if not available expose your service)
- Logging using user:
admin
and password:admin
- Go to Alerting → Contact Point

- Edit the default email contact point.

- Now enter your email and click Test

- You should receive a test email like this.

- Now setup your alters and notifications
Happy Helming !!!
References: