简体   繁体   中英

Kubernetes: Nginx Ingress not providing external IP address

I'm trying to create an Ingress for my Kubernetes cluster on Google Compute Engine. It was working fine while I was using the gke controller class. But I had to change it to nginx controller to be able to specify the back end timeout. The problem is that my Ingress is not being provided with an external IP address.

This is my Ingress manifest:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-router
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "1200"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "1200"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "1200"
    nginx.ingress.kubernetes.io/upstream-fail-timeout: "1200"
    kubernetes.io/ingress.global-static-ip-name: my-ip
spec:
  tls:
  - secretName: nginxsecret
  rules:
  - http:
      paths:
      - path: /*
        backend:
          serviceName: frontend
          servicePort: 8000
      - path: /cron/*
        backend:
          serviceName: esg
          servicePort: 8000

      - path: /task/*
        backend:
          serviceName: esg
          servicePort: 8000

      - path: /api/connections/update/*
        backend:
          serviceName: esg
          servicePort: 8000

      - path: /api/drive/scansheet/*
        backend:
          serviceName: esg
          servicePort: 8000

Is there any configuration missing?

Found the issue. It was due to the fact I had not configured the Nginx controller for the Ingress.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM