Kubernetes: Nginx Ingress not providing external IP address

2,100 views
Skip to first unread message
Assigned to placi...@gmail.com by me

Maurício Júnior

unread,
Feb 18, 2018, 2:57:49 PM2/18/18
to Kubernetes user discussion and Q&A
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

s...@getpolymorph.com

unread,
Apr 14, 2018, 9:11:23 PM4/14/18
to Kubernetes user discussion and Q&A
I may have found your answer in this git ticket and documentation page.
https://github.com/kubernetes/ingress-nginx/issues/894
https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/

It looks like you need to tell kubernetes to preserve the external ip by setting a notation on the ingress.

`service.beta.kubernetes.io/external-traffic: OnlyLocal`

Sunil Bhai

unread,
Apr 16, 2018, 12:16:09 PM4/16/18
to Kubernetes user discussion and Q&A
Reply all
Reply to author
Forward
0 new messages