On Sunday, February 18, 2018 at 11:57:49 AM UTC-8, Maurício Júnior wrote:
> 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

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`

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to