skip to Main Content

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


  1. Chosen as BEST ANSWER

    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


  2. These are the requirements for Internal. HTTP(s) Load Balancing:

    Ingress for Internal HTTP(S) Load Balancing has the following
    requirements:

    • Your cluster must use a GKE version later than 1.16.5-gke.10. Your
      cluster must be VPC-native. Your cluster must have the
    • HttpLoadBalancing add-on enabled. This add-on is enabled by default.
      You must not disable it.
    • You must use Network Endpoint Groups (NEGs)
      as backends for your Service.

    In your case you are using a Shared VPC so you need to add this [annotation] on the service1:

    annotations:
      cloud.google.com/neg: '{"ingress": true}'
    

    Also, check that you have the Ingress firewall rule from the Proxy only subnet

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search