<p>I'm trying to configure email alerts through grafana and I'm unable to find the grafana.ini file. I followed <a href="https://grafana.com/docs/grafana/next/setup-grafana/installation/kubernetes/#deploy-grafana-enterprise-on-kubernetes" rel="nofollow noreferrer">this</a> page to deploy a grafana instance on my local minikube setup and it works fine.</p>
<p>I'm just wondering how to access the grafana.ini file and modify it on minikube? I'm attempting to configure the smtp details in the grafana.ini file so I can send email alerts.</p>

skarsky
<p>Depending on your environment, configuring Grafana using environment variables instead of editing <code>grafana.ini</code> might be an easier option.</p>
<p>The environment variable pattern is the following: <code>GF_&lt;SectionName&gt;_&lt;KeyName&gt;</code></p>
<p>E.g., to configure SMTP, one would edit the following environment variables:</p>
<pre class="lang-bash prettyprint-override"><code># This is a bash script. In real life, you would
# probably add these environment variables in a .yaml file
# (e.g. docker-compose, Kubernetes deployment schema)
export GF_SMTP_ENABLED=true
export GF_SMTP_ENABLED=false
export GF_SMTP_HOST=localhost:25
export GF_SMTP_USER=
export GF_SMTP_PASSWORD=
export GF_SMTP_CERT_FILE=
export GF_SMTP_KEY_FILE=
export GF_SMTP_SKIP_VERIFY=false
export GF_SMTP_FROM_ADDRESS=admin@grafana.localhost
export GF_SMTP_FROM_NAME=grafana
export GF_SMTP_EHLO_IDENTITY=
export GF_SMTP_STARTTLS_POLICY=
</code></pre>
<p><strong>Useful links</strong></p>
<ul>
<li><a href="https://grafana.com/docs/grafana/next/setup-grafana/configure-grafana/" rel="nofollow noreferrer">Configure Grafana</a></li>
<li><a href="https://github.com/grafana/grafana/blob/main/conf/defaults.ini" rel="nofollow noreferrer">Default <code>grafana.ini</code></a></li>
</ul>
