1

I am trying to deploy an https site with a static ip using the contour ingress loadbalancer. Essentially, I am following

https://projectcontour.io/guides/cert-manager/

I have a global static ip named web-ip and ip-address:

35.35.35.35

Now, I am deploying the following ingress file:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: httpbin
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-staging
    ingress.kubernetes.io/force-ssl-redirect: "true"
    kubernetes.io/ingress.class: contour
    kubernetes.io/tls-acme: "true"
    # ADDED FOR STATIC IP
    kubernetes.io/ingress.global-static-ip-name: "web-ip"
spec:
  tls:
  - secretName: httpbin
    hosts:
    - beta.mydomain.com
  rules:
  - host: beta.mydomain.com
    http:
      paths:
      - backend:
          serviceName: httpbin
          servicePort: 8080

Then I am adding contour ingress with

kubectl apply -f https://projectcontour.io/quickstart/contour.yaml

Irrespective of whether I use

        kubernetes.io/ingress.global-static-ip-name: "web-ip"

in the ingress file, this just gives me a random ip address for the load balancer. The site beta.mydomain.com does get linked to the "web-ip" reserved static ip address. What am I missing here?

Mike
  • 3,775
  • 8
  • 39
  • 79
  • 1
    the `kubernetes.io/ingress.global-static-ip-name: "web-ip"` field will only work on GCP when using the GCE ingress controller. The contour controller isn't able to make changes to GCP to assign that IP – Patrick W May 01 '20 at 17:16
  • I've never used contour, but I assume it leverages the LoadBalancer service (like nginx ingress). Is there a LoadBalancer or NodePort service that is created for contour? – Patrick W May 01 '20 at 17:17
  • apparently it is also possible with other ingress controllers (see. e.g https://stackoverflow.com/questions/48763805/does-gke-support-nginx-ingress-with-static-ip). I have now read more about using an appropriate service, but still not sure how to do it. – Mike May 01 '20 at 18:39

0 Answers0