we have created an GKE cluster with shared vpc which will provide us the private IP address. (Concept of Host project and Service Project).
In that we have deployed jenkins with servicetype as clusterIP only. And then created an ingress with annotations as internal, assigning the static ip which i have already reserved for it.
In GCP console in GKE, everything looks green
- i try to access its giving upstream timed-out , i verified the jenkins pod with port-forwarding and its working properly and giving proper UI
- Then i make changes in my ingress to make it as global instead of internal, and i got public ip which works perfectly fine.
- I created another sample nginx deployment and ingress pointing to it, it worked with internal IP address
My questions is, if jenkins on gke environment with ingress resource cannot be used with private IP address only works with public ip
Note :- When i make changes in my Kubernetes service resource with type as loadbalancer then it worked too but not via ingress resources. Basically LB type L4 works but not L7
2
Answers
Hi figure out the issue , indeed it was firewall. My jenkins was running on port 8080 and i didnt add into my firewall rule to allow 8080. Thanks @Deyvid for pointing it out
These are the requirements for Internal. HTTP(s) Load Balancing:
In your case you are using a Shared VPC so you need to add this [annotation] on the service1:
Also, check that you have the Ingress firewall rule from the Proxy only subnet