<p>Before I begin, I would like to mention that I am on the free trial version of GKE. 
I have a simple server running in a GKE cluster. I have a service that I use to expose the server. I am trying to configure an Ingress Controller and attach it to this service. </p>

<p>Everything works perfectly if my service is of type LoadBalancer, NodePort. However, if my service is of type ClusterIP, I get an error saying </p>

<pre><code>error while evaluating the ingress spec: service "default/simple-server" is type "ClusterIP"
, expected "NodePort" or "LoadBalancer" 
</code></pre>

<p>GKE then stops trying to provision an IP for the ingress. Why can't I provision a service of type clusterIP and is there a work around? </p>

<p>I tried using <code>annotations.kubernetes.io/ingress.class: "nginx"</code> and it still didn't work.</p>

<p>That's normal and it's pretty simple why you have the error.</p>

<p>A ClusterIP service is an internal only service inside of your Kubernetes cluster and what you are trying to create (from what I undestood) is a publicly exposed service using ingress, meaning you are going to create a Google Load balancer.</p>

<p>Now the why it doesn't support ClusterIP is because when you create the ingress, the LB resource created inside google cloud needs a target port on your cluster to call on And for that you need to expose an ip/port for it.</p>

<p>I would not recommend combining LB service (wich by default create a LB on cloud provider) and ingress, but stay on a nodeport/ingress duo that is cleaner.</p>

<p>Bonus: The annotation you used is for internal services with ingress to be linked to your ingress controller. This will allow the ingress-controller to list the hosts and proxy traffic to the right service.</p>
