<p>I enabled the ingress addon for my local minikube and created a custom pod, service and ingress. After that I added the ingress host to my hosts file where it points to the minikube ip so that I can reach it with my browser. When accessing the url, the browser is telling my that because of a "HTTP Strict Transport Security (HSTS)" header I was redirected to the https version of that url. Firefox and chrome do not allow me to continue because they say that the certificate (Kubernetes Ingress Controller Fake Certificate) is only valid for the url "ingress.local". With IE11 I can accept the risk and actually continue. What I can do to prevent getting redirected to https? I don't want https, only http. Here are the yaml files of my service and my ingress.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: foobar-ingress
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
  - host: foobar.app
    http:
      paths:
      - path: /
        backend:
          serviceName: foobar-frontend
          servicePort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: foobar-frontend
spec:
  ports:
  - port: 80
    targetPort: 8080
  selector:
    app: foobar-frontend
</code></pre>

<p>It seems I already had it right. The browser was just brutally caching the HSTS header which is why I always got redirected. Even cleaning the cache did not work. So I had to change my ingress to another name and then it worked.</p>
