<h2>Objective</h2>
<p>I am have deployed <a href="https://airflow.apache.org/" rel="nofollow noreferrer">Apache Airflow</a> on AWS' <a href="https://aws.amazon.com/ek" rel="nofollow noreferrer">Elastic Kubernetes Service</a> using Airflow's Stable Helm chart. My goal is to create an Ingress to allow others to access the airflow webserver UI via their browser. It's worth mentioning that I am deploying on EKS using AWS Fargate. My experience with Kubernetes is somewhat limited, and I have not set an Ingress myself before.</p>
<h2>What I have tried to do</h2>
<p>I am currently able to connect to the airflow web-server pod via port-forwarding (like <code>kubectl port-forward airflow-web-pod 8080:8080</code>). I have tried setting the Ingress through the Helm chart (documented <a href="https://github.com/airflow-helm/charts/tree/main/charts/airflow" rel="nofollow noreferrer">here</a>). After which:</p>
<p>Running <code>kubectl get ingress -n dp-airflow</code> I got:</p>
<pre><code>NAME             CLASS    HOSTS                      ADDRESS   PORTS   AGE
airflow-flower   &lt;none&gt;   foo.bar.com             80      3m46s
airflow-web      &lt;none&gt;   foo.bar.com             80      3m46s
</code></pre>
<p>Then running <code>kubectl describe ingress airflow-web -n dp-airflow</code> I get:</p>
<pre><code>Name:             airflow-web
Namespace:        dp-airflow
Address:
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host                      Path  Backends
  ----                      ----  --------
  foo.bar.com
                            /airflow   airflow-web:web (&lt;redacted_ip&gt;:8080)
Annotations:                meta.helm.sh/release-name: airflow
                            meta.helm.sh/release-namespace: dp-airflow
</code></pre>
<p>I am not sure what did I need to put into the browser, so I have tried using <code>http://foo.bar.com/airflow</code> as well as the cluster endpoint/ip without success.</p>
<p>This is how the airflow webservice service looks like:
Running <code>kubectl get services -n dp-airflow</code>, I get:</p>
<pre><code>NAME          TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE
airflow-web   ClusterIP   &lt;redacted_ip&gt;   &lt;none&gt;        8080/TCP   28m
</code></pre>
<h3>Other things I have tried</h3>
<p>I have tried creating an Ingress without the Helm chart (I am using Terraform), like:</p>
<pre class="lang-sh prettyprint-override"><code>resource &quot;kubernetes_ingress&quot; &quot;airflow_ingress&quot; {
  metadata {
    name = &quot;ingress&quot;
  }

  spec {
    backend {
      service_name = &quot;airflow-web&quot;
      service_port = 8080
    }

    rule {
      http {
        path {
          backend {
            service_name = &quot;airflow-web&quot;
            service_port = 8080
          }
          path = &quot;/airflow&quot;
        }
      }
    }
  }
}
</code></pre>
<p>However I was still not able to connect to the web UI. What are the steps that I need to take to set up an Ingress? Which address do I need to use in my browser to connect to the web UI?</p>
<p>I am happy to provide further details if needed.</p>

alt-f4
<p>It sound like you have created <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="noreferrer">Ingress</a> resources. That is a good step. But for those Ingress resources to have any effect, you also need an <a href="https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/" rel="noreferrer">Ingress Controller</a> than can <em>realize</em> your Ingress to an actual <em>load balancer</em>.</p>
<p>In an AWS environment, you should look at <a href="https://github.com/kubernetes-sigs/aws-load-balancer-controller" rel="noreferrer">AWS Load Balancer Controller</a> that creates an <a href="https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html" rel="noreferrer">AWS Application Load Balancer</a> that is configured according your Ingress resources.</p>
<blockquote>
<p>Ingress to connect to a ClusterIP service?</p>
</blockquote>
<p>First, the default load balancer is <em>classic load balancer</em>, but you probably want to use the newer <em>Application Load Balancer</em> to be used for your Ingress resources, so on your Ingress resources add this annotation:</p>
<pre><code>annotations:
    kubernetes.io/ingress.class: alb
</code></pre>
<p>By default, your services should be of type <code>NodePort</code>, but as you request, it is possible to use <code>ClusterIP</code> services as well, when you on your Ingress resource also add this annotation (for traffic mode):</p>
<pre><code>alb.ingress.kubernetes.io/target-type: ip
</code></pre>
<p>See the <a href="https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html" rel="noreferrer">ALB Ingress documentation</a> for more on this.</p>
