<p>I'm working on helm-charts and it should do the following:</p>
<ul>
<li>Allow external requests over HTTPS only (to a specific service).</li>
<li>Allow internal requests over HTTP (to the same specific service).</li>
</ul>
<p>I tried creating two ingress in which:</p>
<ul>
<li>The first ingress is external and accepts only HTTPS requests (which is working as expected). I used the following anntations:</li>
</ul>
<pre><code>    kubernetes.io/ingress.class: nginx
    ingress.citrix.com/ssl-passthrough: &quot;true&quot;
    nginx.ingress.kubernetes.io/secure-backends: &quot;true&quot;
    nginx.ingress.kubernetes.io/actions.ssl-redirect: '{&quot;Type&quot;: &quot;redirect&quot;, &quot;RedirectConfig&quot;: { &quot;Protocol&quot;: &quot;HTTPS&quot;, &quot;Port&quot;: &quot;443&quot;, &quot;StatusCode&quot;: &quot;HTTP_301&quot;}}'
    nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTPS&quot;
</code></pre>
<ul>
<li><p>The second ingress is internal (with annotation <code>kubernetes.io/ingress.class: &quot;gce-internal&quot;</code>). This one is aimed to accept requests only from inside Minikube cluster. But it's is not working.</p>
<ul>
<li>Running <code>nslookup &lt;host-name&gt;</code> from outside Minikube cluster returns <code>** server can't find &lt;host-name&gt;: NXDOMAIN</code>.</li>
<li>Running <code>nslookup &lt;host-name&gt;</code> from inside MInikube cluster (<code>minikube ssh</code>) returns <code>;; connection timed out; no servers could be reached</code>.</li>
<li>Running <code>curl -kv &quot;&lt;host-name&gt;&quot;</code> returns <code>curl: (6) Could not resolve host: &lt;host-name&gt;</code>.</li>
</ul>
</li>
</ul>
<p>Any ideas on how to fix this?</p>

TamerB
<p>For internal communication ideally, you should be using the <strong>service name</strong> as the hostname.</p>
<p>However you can crate the internal ingress it is possible, but it will give you one single IP address. Using that IP address you can call the service.</p>
<p>Considering you are already running the ingress controller of Nginx and service.</p>
<p>You can edit the ingress service and inject or update this annotation to the service.</p>
<pre><code>annotations:  
    cloud.google.com/load-balancer-type: &quot;Internal&quot; 
</code></pre>
<p>this above line will create the <strong>Load Balancer</strong> service with the <code>internal IP</code> for ingress. You can create the ingress and resolve it using the curl.</p>
<p><a href="https://stackoverflow.com/a/62559152/5525824">https://stackoverflow.com/a/62559152/5525824</a></p>
<p>still with GCP if you are not getting the static IP address you can use this snippet</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-ingress
  annotations:
    kubernetes.io/ingress.regional-static-ip-name: STATIC_IP_NAME
    kubernetes.io/ingress.class: &quot;gce-internal&quot;
</code></pre>
<p>read more at : <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balance-ingress#static_ip_addressing" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balance-ingress#static_ip_addressing</a></p>
