<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[container-lab]]></title><description><![CDATA[container-lab]]></description><link>https://container-lab.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 22 Nov 2026 15:00:36 GMT</lastBuildDate><atom:link href="https://container-lab.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Alert Nginx Ingress Controller End Of Life: March 2026 Migrate To Traefik]]></title><description><![CDATA[Deploying Grafana with Traefik Ingress on Kubernetes]]></description><link>https://container-lab.hashnode.dev/alert-nginx-ingress-controller-end-of-life-march-2026-migrate-to-traefik</link><guid isPermaLink="true">https://container-lab.hashnode.dev/alert-nginx-ingress-controller-end-of-life-march-2026-migrate-to-traefik</guid><dc:creator><![CDATA[Ankoay Feno]]></dc:creator><pubDate>Wed, 03 Dec 2025 03:02:26 GMT</pubDate><content:encoded><![CDATA[<h1 id="heading-deploying-grafana-with-traefik-ingress-on-kubernetes">Deploying Grafana with Traefik Ingress on Kubernetes</h1>
<h2 id="heading-why-this-matters">Why This Matters</h2>
<p>The official NGINX Ingress Controller will be retired in March 2026, with no further releases, bug fixes, or security updates after that date. This affects millions of Kubernetes deployments worldwide, making now the perfect time to explore alternatives.</p>
<p>This guide shows you how to use <strong>Traefik</strong> as your ingress controller—a modern, actively maintained alternative that offers:</p>
<ul>
<li><p>Simple configuration and automatic service discovery</p>
</li>
<li><p>Native Kubernetes integration</p>
</li>
<li><p>Built-in TLS/SSL support</p>
</li>
<li><p>No service mesh complexity</p>
</li>
</ul>
<h2 id="heading-what-youll-build">What You'll Build</h2>
<p>By the end of this tutorial, you'll have:</p>
<ul>
<li><p>Traefik ingress controller running on EKS</p>
</li>
<li><p>A persistent storage class for stateful applications</p>
</li>
<li><p>Grafana running as a StatefulSet with persistent storage</p>
</li>
<li><p>Grafana exposed securely via HTTPS over TLS</p>
</li>
</ul>
<h2 id="heading-architecture-overview">Architecture Overview</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1764729784355/91faf006-a50b-477c-a132-958ab405c1e4.jpeg" alt class="image--center mx-auto" /></p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<p>Before starting, ensure you have:</p>
<ul>
<li><p><code>helm</code> CLI installed</p>
</li>
<li><p><code>kubectl</code> CLI installed</p>
</li>
<li><p>A functional EKS cluster (nightmare? deploy with )<a target="_blank" href="https://cloud-lab.hashnode.dev/deploy-scalable-eks-cluster-on-aws-with-terraform">this</a></p>
</li>
<li><p>A domain name and access to its DNS settings</p>
</li>
</ul>
<hr />
<h2 id="heading-step-1-install-traefik">Step 1: Install Traefik</h2>
<p>Add the Traefik Helm repository:</p>
<pre><code class="lang-bash">helm repo add traefik https://traefik.github.io/charts
helm repo update
</code></pre>
<p>Install Traefik in the <code>demo</code> namespace:</p>
<pre><code class="lang-bash">helm upgrade --install traefik traefik/traefik \
  --namespace demo \
  --create-namespace \
  -f values.eks.yaml
</code></pre>
<blockquote>
<p><strong>Note:</strong> You'll need to create a <code>values.eks.yaml</code> file with EKS-specific configuration below.</p>
<pre><code class="lang-yaml"><span class="hljs-comment"># values.eks.yaml</span>
<span class="hljs-attr">service:</span>
  <span class="hljs-attr">enabled:</span> <span class="hljs-literal">true</span>
  <span class="hljs-attr">type:</span> <span class="hljs-string">LoadBalancer</span>
  <span class="hljs-attr">annotations:</span>
    <span class="hljs-attr">service.beta.kubernetes.io/aws-load-balancer-type:</span> <span class="hljs-string">"nlb"</span>

<span class="hljs-attr">ports:</span>
  <span class="hljs-attr">web:</span>
    <span class="hljs-attr">port:</span> <span class="hljs-number">8000</span>
    <span class="hljs-attr">expose:</span>
      <span class="hljs-attr">default:</span> <span class="hljs-literal">true</span>
    <span class="hljs-attr">exposedPort:</span> <span class="hljs-number">80</span>
    <span class="hljs-attr">protocol:</span> <span class="hljs-string">TCP</span>
    <span class="hljs-attr">redirections:</span>
      <span class="hljs-attr">entryPoint:</span>
        <span class="hljs-attr">to:</span> <span class="hljs-string">websecure</span>
        <span class="hljs-attr">scheme:</span> <span class="hljs-string">https</span> 
        <span class="hljs-attr">permanent:</span> <span class="hljs-literal">true</span>

  <span class="hljs-attr">websecure:</span>
    <span class="hljs-attr">expose:</span>
      <span class="hljs-attr">default:</span> <span class="hljs-literal">true</span>
    <span class="hljs-attr">exposedPort:</span> <span class="hljs-number">443</span>
    <span class="hljs-attr">tls:</span>
      <span class="hljs-attr">enabled:</span> <span class="hljs-literal">true</span>
      <span class="hljs-attr">certResolver:</span> <span class="hljs-string">"le"</span>

<span class="hljs-attr">ingressClass:</span>
  <span class="hljs-attr">enabled:</span> <span class="hljs-literal">true</span>
  <span class="hljs-attr">isDefaultClass:</span> <span class="hljs-literal">true</span>

<span class="hljs-attr">providers:</span>
  <span class="hljs-attr">kubernetesIngress:</span>
    <span class="hljs-attr">enabled:</span> <span class="hljs-literal">true</span>
    <span class="hljs-attr">publishedService:</span>
      <span class="hljs-attr">enabled:</span> <span class="hljs-literal">true</span>
  <span class="hljs-attr">kubernetesCRD:</span>
    <span class="hljs-attr">enabled:</span> <span class="hljs-literal">true</span>

<span class="hljs-attr">api:</span>
  <span class="hljs-attr">dashboard:</span> <span class="hljs-literal">true</span>

<span class="hljs-attr">ingressRoute:</span>
  <span class="hljs-attr">dashboard:</span>
    <span class="hljs-attr">enabled:</span> <span class="hljs-literal">true</span>
    <span class="hljs-attr">entryPoints:</span> [<span class="hljs-string">"traefik"</span>]


<span class="hljs-attr">certificatesResolvers:</span>
  <span class="hljs-attr">le:</span>
    <span class="hljs-attr">acme:</span>
      <span class="hljs-attr">email:</span> <span class="hljs-string">"ankoayfeno@gmail.com"</span>
      <span class="hljs-attr">storage:</span> <span class="hljs-string">/tmp/acme.json</span>
      <span class="hljs-attr">httpChallenge:</span>
        <span class="hljs-attr">entryPoint:</span> <span class="hljs-string">web</span>
<span class="hljs-attr">persistence:</span>
  <span class="hljs-attr">enabled:</span> <span class="hljs-literal">false</span>
</code></pre>
</blockquote>
<hr />
<h2 id="heading-step-2-install-storageclass">Step 2: Install StorageClass</h2>
<p>Since Grafana is a StatefulSet requiring persistent storage, you need a StorageClass.</p>
<p>Add the Helm chart repository:</p>
<pre><code class="lang-bash">helm repo add eks-helm-charts https://ankoay-feno.github.io/helm-charts/docs
helm repo update
</code></pre>
<p>View available charts:</p>
<pre><code class="lang-bash">helm search repo eks-helm-charts
</code></pre>
<p>Install the StorageClass:</p>
<pre><code class="lang-bash">helm install storageclass eks-helm-charts/storageclass
</code></pre>
<hr />
<h2 id="heading-step-3-deploy-grafana-statefulset">Step 3: Deploy Grafana StatefulSet</h2>
<p>Create a file named <code>grafana-statefulset.yaml</code>:</p>
<pre><code class="lang-yaml"><span class="hljs-attr">apiVersion:</span> <span class="hljs-string">v1</span>
<span class="hljs-attr">kind:</span> <span class="hljs-string">Namespace</span>
<span class="hljs-attr">metadata:</span>
  <span class="hljs-attr">name:</span> <span class="hljs-string">demo</span>
<span class="hljs-meta">---</span>
<span class="hljs-attr">apiVersion:</span> <span class="hljs-string">v1</span>
<span class="hljs-attr">kind:</span> <span class="hljs-string">Service</span>
<span class="hljs-attr">metadata:</span>
  <span class="hljs-attr">name:</span> <span class="hljs-string">grafana-statefulset</span>
  <span class="hljs-attr">namespace:</span> <span class="hljs-string">demo</span>
<span class="hljs-attr">spec:</span>
  <span class="hljs-attr">selector:</span>
    <span class="hljs-attr">app:</span> <span class="hljs-string">grafana</span>
  <span class="hljs-attr">ports:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-attr">port:</span> <span class="hljs-number">80</span>
      <span class="hljs-attr">targetPort:</span> <span class="hljs-number">3000</span>
<span class="hljs-meta">---</span>
<span class="hljs-attr">apiVersion:</span> <span class="hljs-string">apps/v1</span>
<span class="hljs-attr">kind:</span> <span class="hljs-string">StatefulSet</span>
<span class="hljs-attr">metadata:</span>
  <span class="hljs-attr">name:</span> <span class="hljs-string">grafana-statefulset</span>
  <span class="hljs-attr">namespace:</span> <span class="hljs-string">demo</span>
<span class="hljs-attr">spec:</span>
  <span class="hljs-attr">serviceName:</span> <span class="hljs-string">grafana-statefulset</span>
  <span class="hljs-attr">replicas:</span> <span class="hljs-number">1</span>
  <span class="hljs-attr">selector:</span>
    <span class="hljs-attr">matchLabels:</span>
      <span class="hljs-attr">app:</span> <span class="hljs-string">grafana</span>
  <span class="hljs-attr">template:</span>
    <span class="hljs-attr">metadata:</span>
      <span class="hljs-attr">labels:</span>
        <span class="hljs-attr">app:</span> <span class="hljs-string">grafana</span>
    <span class="hljs-attr">spec:</span>
      <span class="hljs-attr">securityContext:</span>
        <span class="hljs-attr">fsGroup:</span> <span class="hljs-number">472</span>
      <span class="hljs-attr">initContainers:</span>
        <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">fix-permissions</span>
          <span class="hljs-attr">image:</span> <span class="hljs-string">busybox</span>
          <span class="hljs-attr">command:</span> 
            <span class="hljs-bullet">-</span> <span class="hljs-string">"sh"</span>
            <span class="hljs-bullet">-</span> <span class="hljs-string">"-c"</span>
            <span class="hljs-bullet">-</span> <span class="hljs-string">"chown -R 472:472 /var/lib/grafana &amp;&amp; chmod -R 755 /var/lib/grafana"</span>
          <span class="hljs-attr">volumeMounts:</span>
            <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">grafana-storage</span>
              <span class="hljs-attr">mountPath:</span> <span class="hljs-string">/var/lib/grafana</span>
      <span class="hljs-attr">containers:</span>
        <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">grafana</span>
          <span class="hljs-attr">image:</span> <span class="hljs-string">grafana/grafana:latest</span>
          <span class="hljs-attr">securityContext:</span>
            <span class="hljs-attr">runAsUser:</span> <span class="hljs-number">472</span>
            <span class="hljs-attr">runAsGroup:</span> <span class="hljs-number">472</span>
          <span class="hljs-attr">ports:</span>
            <span class="hljs-bullet">-</span> <span class="hljs-attr">containerPort:</span> <span class="hljs-number">3000</span>
          <span class="hljs-attr">env:</span>
            <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">GF_SECURITY_ADMIN_USER</span>
              <span class="hljs-attr">value:</span> <span class="hljs-string">"admin"</span>
            <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">GF_SECURITY_ADMIN_PASSWORD</span>
              <span class="hljs-attr">value:</span> <span class="hljs-string">"admin"</span>
            <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">GF_PATHS_DATA</span>
              <span class="hljs-attr">value:</span> <span class="hljs-string">"/var/lib/grafana"</span>
          <span class="hljs-attr">volumeMounts:</span>
            <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">grafana-storage</span>
              <span class="hljs-attr">mountPath:</span> <span class="hljs-string">/var/lib/grafana</span>
          <span class="hljs-attr">resources:</span>
            <span class="hljs-attr">requests:</span>
              <span class="hljs-attr">memory:</span> <span class="hljs-string">"256Mi"</span>
              <span class="hljs-attr">cpu:</span> <span class="hljs-string">"100m"</span>
            <span class="hljs-attr">limits:</span>
              <span class="hljs-attr">memory:</span> <span class="hljs-string">"512Mi"</span>
              <span class="hljs-attr">cpu:</span> <span class="hljs-string">"500m"</span>
          <span class="hljs-attr">readinessProbe:</span>
            <span class="hljs-attr">httpGet:</span>
              <span class="hljs-attr">path:</span> <span class="hljs-string">/api/health</span>
              <span class="hljs-attr">port:</span> <span class="hljs-number">3000</span>
            <span class="hljs-attr">initialDelaySeconds:</span> <span class="hljs-number">60</span>
            <span class="hljs-attr">periodSeconds:</span> <span class="hljs-number">10</span>
          <span class="hljs-attr">livenessProbe:</span>
            <span class="hljs-attr">httpGet:</span>
              <span class="hljs-attr">path:</span> <span class="hljs-string">/api/health</span>
              <span class="hljs-attr">port:</span> <span class="hljs-number">3000</span>
            <span class="hljs-attr">initialDelaySeconds:</span> <span class="hljs-number">90</span>
            <span class="hljs-attr">periodSeconds:</span> <span class="hljs-number">30</span>
  <span class="hljs-attr">volumeClaimTemplates:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-attr">metadata:</span>
        <span class="hljs-attr">name:</span> <span class="hljs-string">grafana-storage</span>
      <span class="hljs-attr">spec:</span>
        <span class="hljs-attr">accessModes:</span> [<span class="hljs-string">"ReadWriteOnce"</span>]
        <span class="hljs-attr">resources:</span>
          <span class="hljs-attr">requests:</span>
            <span class="hljs-attr">storage:</span> <span class="hljs-string">1Gi</span>
</code></pre>
<p>Apply the manifest:</p>
<pre><code class="lang-bash">kubectl apply -f grafana-statefulset.yaml
</code></pre>
<hr />
<h2 id="heading-step-4-expose-grafana-with-ingress">Step 4: Expose Grafana with Ingress</h2>
<p>Create a file named <code>grafana-ingress.yaml</code>:</p>
<pre><code class="lang-yaml"><span class="hljs-attr">apiVersion:</span> <span class="hljs-string">networking.k8s.io/v1</span>
<span class="hljs-attr">kind:</span> <span class="hljs-string">Ingress</span>
<span class="hljs-attr">metadata:</span>
  <span class="hljs-attr">name:</span> <span class="hljs-string">grafana</span>
  <span class="hljs-attr">namespace:</span> <span class="hljs-string">demo</span>
  <span class="hljs-attr">annotations:</span>
    <span class="hljs-attr">traefik.ingress.kubernetes.io/redirect-entry-point:</span> <span class="hljs-string">websecure</span>
<span class="hljs-attr">spec:</span>
  <span class="hljs-attr">ingressClassName:</span> <span class="hljs-string">traefik</span> 
  <span class="hljs-attr">rules:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-attr">host:</span> <span class="hljs-string">grafana.example.com</span>
      <span class="hljs-attr">http:</span>
        <span class="hljs-attr">paths:</span>
          <span class="hljs-bullet">-</span> <span class="hljs-attr">path:</span> <span class="hljs-string">/.well-known/acme-challenge/</span>
            <span class="hljs-attr">pathType:</span> <span class="hljs-string">Prefix</span>
            <span class="hljs-attr">backend:</span>
              <span class="hljs-attr">service:</span>
                <span class="hljs-attr">name:</span> <span class="hljs-string">traefik</span>
                <span class="hljs-attr">port:</span>
                  <span class="hljs-attr">number:</span> <span class="hljs-number">8000</span>
          <span class="hljs-bullet">-</span> <span class="hljs-attr">path:</span> <span class="hljs-string">/</span>
            <span class="hljs-attr">pathType:</span> <span class="hljs-string">Prefix</span>
            <span class="hljs-attr">backend:</span>
              <span class="hljs-attr">service:</span>
                <span class="hljs-attr">name:</span> <span class="hljs-string">grafana-statefulset</span>
                <span class="hljs-attr">port:</span>
                  <span class="hljs-attr">number:</span> <span class="hljs-number">80</span>
  <span class="hljs-attr">tls:</span>
    <span class="hljs-bullet">-</span> <span class="hljs-attr">hosts:</span>
        <span class="hljs-bullet">-</span> <span class="hljs-string">grafana.example.com</span>
</code></pre>
<p>Apply the ingress:</p>
<pre><code class="lang-bash">kubectl apply -f grafana-ingress.yaml
</code></pre>
<blockquote>
<p><strong>Important:</strong> Replace <a target="_blank" href="http://grafana.example.com"><code>grafana.example.com</code></a> with your actual domain name.</p>
</blockquote>
<hr />
<h2 id="heading-step-5-configure-dns">Step 5: Configure DNS</h2>
<p>Get the Traefik load balancer URL:</p>
<pre><code class="lang-bash">kubectl get svc -n demo
</code></pre>
<p>Look for the <code>EXTERNAL-IP</code> of the Traefik service (it will be an AWS Load Balancer URL).</p>
<p>Add a DNS record with your DNS provider:</p>
<ul>
<li><p><strong>Type:</strong> CNAME</p>
</li>
<li><p><strong>Name:</strong> grafana</p>
</li>
<li><p><strong>Value:</strong> [Your Traefik Load Balancer URL]</p>
</li>
<li><p><strong>TTL:</strong> 60 seconds (1 minute)</p>
</li>
</ul>
<hr />
<h2 id="heading-accessing-grafana">Accessing Grafana</h2>
<p>After DNS propagates (typically 1-5 minutes), access Grafana at:</p>
<pre><code class="lang-bash">https://grafana.example.com
</code></pre>
<p>Default credentials:</p>
<ul>
<li><p><strong>Username:</strong> admin</p>
</li>
<li><p><strong>Password:</strong> admin</p>
</li>
</ul>
<blockquote>
<p><strong>Security Note:</strong> Change the default password immediately after first login.</p>
</blockquote>
<hr />
<h2 id="heading-next-steps">Next Steps</h2>
<ul>
<li><p>Configure Grafana data sources</p>
</li>
<li><p>Set up dashboards for monitoring</p>
</li>
<li><p>Change default admin password</p>
</li>
<li><p>Consider using Kubernetes secrets for credentials instead of environment variables</p>
</li>
<li><p>Set up proper backup strategies for your persistent volumes</p>
</li>
</ul>
<hr />
<h2 id="heading-troubleshooting">Troubleshooting</h2>
<p>Check Traefik logs:</p>
<pre><code class="lang-bash">kubectl logs -n demo -l app.kubernetes.io/name=traefik
</code></pre>
<p>Check Grafana logs:</p>
<pre><code class="lang-bash">kubectl logs -n demo -l app=grafana
</code></pre>
<p>Verify ingress status:</p>
<pre><code class="lang-bash">kubectl describe ingress grafana -n demo
</code></pre>
]]></content:encoded></item></channel></rss>