<p>I am setting <code>jenkins</code> on GKE using the official <a href="https://github.com/helm/charts/tree/master/stable/jenkins" rel="nofollow noreferrer">helm</a> chart.</p>

<p>I am also installing the <code>nginx</code> ingress also via its stable <a href="https://github.com/helm/charts/tree/master/stable/nginx-ingress" rel="nofollow noreferrer">helm</a> chart and after creating a static IP on GCE as follows:</p>

<pre><code>gcloud compute addresses create jenkins-static-ip --global --ip-version IPV4
</code></pre>

<p>I am passing the above IP to the nginx-ingress helm values:</p>

<pre><code>helm upgrade --force --tls --install nginx-ingress stable/nginx-ingress --set rbac.create=true --set controller.service.loadBalancerIP=&lt;jenkins-static-ip&gt;
</code></pre>

<p>I am also using the <a href="https://github.com/helm/charts/blob/master/stable/jenkins/values.yaml#L131" rel="nofollow noreferrer">prefix</a> <code>/jenkins</code> for accessing the <code>jenkins</code> service.</p>

<p>Both the ingress controller and the ingress resource are created as below:</p>

<pre><code>kubectl get svc nginx-ingress-controller -n default -o json
{
    "apiVersion": "v1",
    "kind": "Service",
    "metadata": {
        "creationTimestamp": "2020-02-12T09:54:50Z",
        "labels": {
            "app": "nginx-ingress",
            "chart": "nginx-ingress-1.29.6",
            "component": "controller",
            "heritage": "Tiller",
            "release": "nginx-ingress"
        },
        "name": "nginx-ingress-controller",
        "namespace": "default",
        "resourceVersion": "35664441",
        "selfLink": "/api/v1/namespaces/default/services/nginx-ingress-controller",
        "uid": "b6029772-4d7d-11ea-aa7f-42010a79fa0b"
    },
    "spec": {
        "clusterIP": "10.19.150.227",
        "externalTrafficPolicy": "Cluster",
        "loadBalancerIP": "13.579.24.68",
        "ports": [
            {
                "name": "http",
                "nodePort": 30508,
                "port": 80,
                "protocol": "TCP",
                "targetPort": "http"
            },
            {
                "name": "https",
                "nodePort": 32756,
                "port": 443,
                "protocol": "TCP",
                "targetPort": "https"
            }
        ],
        "selector": {
            "app": "nginx-ingress",
            "component": "controller",
            "release": "nginx-ingress"
        },
        "sessionAffinity": "None",
        "type": "LoadBalancer"
    },
    "status": {
        "loadBalancer": {}
    }
}
</code></pre>

<pre><code>kubectl get ingress my-jenkins -n jenkins -o yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  creationTimestamp: "2020-02-12T09:54:54Z"
  generation: 1
  labels:
    app.kubernetes.io/component: jenkins-master
    app.kubernetes.io/instance: my-jenkins
    app.kubernetes.io/managed-by: Tiller
    app.kubernetes.io/name: jenkins
    helm.sh/chart: jenkins-1.9.16
  name: my-jenkins
  namespace: jenkins
  resourceVersion: "35664516"
  selfLink: /apis/extensions/v1beta1/namespaces/jenkins/ingresses/my-jenkins
  uid: b8604a30-4d7d-11ea-aa7f-42010a79fa0b
spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: my-jenkins
          servicePort: 8080
        path: /jenkins
status:
  loadBalancer: {}
</code></pre>

<p>However I am unable to access <code>jenkins</code> in any of the following urls:</p>

<pre><code>http://13.579.24.68
https://13.579.24.68
http://13.579.24.68/jenkins
https://13.579.24.68/jenkins
</code></pre>

<p><strong>edit</strong>: I have added the annotation to my <code>ingress</code> resource but the result remains the same:</p>

<pre><code>▶ k get ingress my-jenkins -n jenkins -o yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
  creationTimestamp: "2020-02-12T16:00:40Z"
  generation: 1
  labels:
    app.kubernetes.io/component: jenkins-master
    app.kubernetes.io/instance: my-jenkins
    app.kubernetes.io/managed-by: Tiller
    app.kubernetes.io/name: jenkins
    helm.sh/chart: jenkins-1.9.16
  name: my-jenkins
  namespace: jenkins
  resourceVersion: "35776360"
  selfLink: /apis/extensions/v1beta1/namespaces/jenkins/ingresses/my-jenkins
  uid: d1405c90-4db0-11ea-aa7f-42010a79fa0b
spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: my-jenkins
          servicePort: 8080
        path: /jenkins
status:
  loadBalancer: {}
</code></pre>

<p>Any idea why is this happening?</p>

pkaramol
<p>You are missing the <code>kubernetes.io/ingress.class: nginx</code> annotation on your Ingress object for Jenkins.</p>

<p>From the <a href="https://github.com/helm/charts/tree/master/stable/nginx-ingress" rel="nofollow noreferrer">nginx-ingress Helm Chart's documentation</a>:</p>

<blockquote>
  <p>To use, add the kubernetes.io/ingress.class: nginx annotation to your Ingress resources.</p>
</blockquote>
