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

<p>I am <a href="https://github.com/helm/charts/blob/master/stable/jenkins/values.yaml#L344" rel="nofollow noreferrer">enabling</a> <code>Ingress</code> therefore the corresponding <a href="https://github.com/helm/charts/blob/master/stable/jenkins/templates/jenkins-master-ingress.yaml" rel="nofollow noreferrer">template</a> should be applied and the resource created.</p>

<p>According to the official GKE <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/ingress" rel="nofollow noreferrer">documentation</a>:</p>

<blockquote>
  <p>When you create the Ingress, the GKE ingress controller creates and configures an HTTP(S) load balancer according to the information in the Ingress and the associated Services. Also, the load balancer is given a stable IP address that you can associate with a domain name.</p>
</blockquote>

<p>However, this does not happen in my case; the ingress does not get an external IP associated with it:</p>

<pre><code>▶ k get ingress --all-namespaces
NAMESPACE   NAME                HOSTS   ADDRESS   PORTS   AGE
jenkins     jenkins-inception   *                 80      82s
</code></pre>

<p>Here is the actual <code>Ingress</code> resource:</p>

<pre><code>▶ k get ingress --all-namespaces -o yaml
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      kubernetes.io/ingress.class: nginx
    creationTimestamp: "2020-01-24T21:20:49Z"
    generation: 1
    labels:
      app.kubernetes.io/component: jenkins-master
      app.kubernetes.io/instance: jenkins-inception
      app.kubernetes.io/managed-by: Tiller
      app.kubernetes.io/name: jenkins
      helm.sh/chart: jenkins-1.9.16
    name: jenkins-inception
    namespace: jenkins
    resourceVersion: "15741661"
    selfLink: /apis/extensions/v1beta1/namespaces/jenkins/ingresses/jenkins-inception
    uid: 6461793e-3eef-11ea-a0a5-42010a790807
  spec:
    rules:
    - http:
        paths:
        - backend:
            serviceName: jenkins-inception
            servicePort: 8080
          path: /jenkins
  status:
    loadBalancer: {}
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
</code></pre>

<p>Why is that?</p>

<p>Have tried both <code>nginx</code> and <code>gce</code> in <code>kubernetes.io/ingress.class</code> annotation values.</p>

<p><strong>edit_1</strong>: it seems that the <code>HTTP Load Balancing</code> Add On is enabled.</p>

<p><a href="https://i.stack.imgur.com/xL8nn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xL8nn.png" alt="enter image description here"></a></p>

<p>The weirdest part however is the following:</p>

<pre><code>▶ k describe ingress jenkins-inception -n jenkins
Error from server (NotFound): the server could not find the requested resource

~                                                                                                                                         
▶ k get ingress jenkins-inception -n jenkins
NAME                HOSTS   ADDRESS   PORTS   AGE
jenkins-inception   *                 80      11h

</code></pre>

<p><strong>edit_2</strong>:</p>

<pre><code>Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:40:16Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.11-gke.14", GitCommit:"56d89863d1033f9668ddd6e1c1aea81cd846ef88", GitTreeState:"clean", BuildDate:"2019-11-07T19:12:22Z", GoVersion:"go1.12.11b4", Compiler:"gc", Platform:"linux/amd64"}

</code></pre>

<p><strong>edit_3</strong>: After addressing the <code>kubectl</code> compatibility issue, it turns out no events are generated by the ingress</p>

<pre><code>▶ k describe ingress jenkins-inception -n jenkins
Name:             jenkins-inception
Namespace:        jenkins
Address:
Default backend:  default-http-backend:80 (10.8.32.33:8080)
Rules:
  Host  Path  Backends
  ----  ----  --------
  *
        /jenkins   jenkins-inception:8080 (10.8.33.87:8080)
Annotations:
  kubernetes.io/ingress.class:  nginx
Events:                         &lt;none&gt;
</code></pre>

<p>Is there a command line to list enabled add-ons on a cluster?</p>

<p><strong>edit_4</strong>: About the add ons..</p>

<pre><code>▶ gcloud container clusters describe inception-cluster --zone us-east4-b | grep -i add -A 6
addonsConfig:
  horizontalPodAutoscaling: {}
  httpLoadBalancing: {}
  kubernetesDashboard:
    disabled: true
  networkPolicyConfig:
    disabled: true
</code></pre>

<p><strong>edit_5</strong>: After enabling the actual GCE ingress with the correct annotation as pointed out in comments by @Arghya Sadhu, I see the following error in the ingress description</p>

<blockquote>
  <p>Warning  Translate  2s (x11 over 7s)  loadbalancer-controller  error while evaluating the ingress spec: service "jenkins/jenkins-inception" is type "ClusterIP", expected "NodePort" or "LoadBalancer"</p>
</blockquote>

<p>However this contradicts with the following <a href="https://github.com/helm/charts/blob/master/stable/jenkins/values.yaml#L141" rel="nofollow noreferrer">recommendation</a> from the official <code>jenkins</code> helm charts:</p>

<pre><code>  # For minikube, set this to NodePort, elsewhere use LoadBalancer
  # Use ClusterIP if your setup includes ingress controller
</code></pre>

<p><strong>edit_6</strong>: The ingress managed to get a public IP:</p>

<pre><code>  spec:
    rules:
    - http:
        paths:
        - backend:
            serviceName: jenkins-inception
            servicePort: 8080
          path: /jenkins
  status:
    loadBalancer:
      ingress:
      - ip: 12.234.543.111
</code></pre>

<p>However I am unable to access the following paths:</p>

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

<p><strong>edit_7</strong>: The <code>yaml</code> of the <code>jenkins-inception</code> service</p>

<pre><code>▶ k get svc jenkins-inception -o yaml
apiVersion: v1
kind: Service
metadata:
  creationTimestamp: "2020-01-25T12:40:14Z"
  labels:
    app.kubernetes.io/component: jenkins-master
    app.kubernetes.io/instance: jenkins-inception
    app.kubernetes.io/managed-by: Tiller
    app.kubernetes.io/name: jenkins
    helm.sh/chart: jenkins-1.9.16
  name: jenkins-inception
  namespace: jenkins
  resourceVersion: "16000964"
  selfLink: /api/v1/namespaces/jenkins/services/jenkins-inception
  uid: d5bfd760-3f6f-11ea-a0a5-42010a790807
spec:
  clusterIP: 10.8.59.184
  externalTrafficPolicy: Cluster
  ports:
  - name: http
    nodePort: 30361
    port: 8080
    protocol: TCP
    targetPort: 8080
  selector:
    app.kubernetes.io/component: jenkins-master
    app.kubernetes.io/instance: jenkins-inception
  sessionAffinity: None
  type: NodePort
status:
  loadBalancer: {}
</code></pre>

pkaramol
<p>Run describe on the Ingress. If you see create/add events, you have an Ingress controller running in the cluster, otherwise, you probably have the HttpLoadBalancing(GKE Ingress Controller) add-on disabled on your GKE cluster</p>

<p><strong>Edit1:</strong></p>

<p>You have version incompatibility between kubernetes server and kubectl. You can check both client and server version by running below command. Check this <a href="https://github.com/kubernetes/kubectl/issues/675" rel="nofollow noreferrer">issue</a> for details.</p>

<pre><code>kubectl version
</code></pre>

<p><strong>Edit2:</strong></p>

<p>You either should not have the annotation <code>kubernetes.io/ingress.class</code> or if you have it needs be gce <code>kubernetes.io/ingress.class:  gce</code></p>

<p><strong>Edit3:</strong></p>

<p>As per the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/load-balance-ingress" rel="nofollow noreferrer">google cloud doc</a> the service type for jenkins-inception service needs to be of type NodePort </p>
