GKE Warning when using multiple Ingress controllers

Issue

  • After provisioning a managed master, the GKE Services console shows a warning Error during sync: error while evaluating the ingress spec: service "<namespace>/<masterName>" is type "ClusterIP", expected "NodePort" or "LoadBalancer":

Environment

Explanation

This is a warning and does not impact the operations or the cluster. kubectl get ing can be used to validate that the Ingress resources exist.

The root cause of that warning is often due to the fact that there are multiple Ingress Controller installed in the cluster. On GKE, there is the GCE Ingress Controller installed by default. Installing a different Ingress controller - like for example the Kubernetes Ingress Nginx Controller - could cause this warning in GCE UI because there are 2 controllers claiming the Ingress resources.

Resolution

The solution / workaround is to force one controller to satisfy the ingress using the kubernetes.io/ingress.class annotation as explained in https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress.

In the configuration of an existing Managed Master, add the following snippet to the YAML field:

---
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: "nginx"

Then restart the master from CJOC’s UI.

Note: The same configuration can be applied under Manage Jenkins > Configure System > Kubernetes Master Provisioning > Advanced > Default Storage Class Name. This setting would apply to newly created master only.

Another solution is to disable / uninstall one of the ingress controller. To disable the GCE Ingress Controller, please refer to How do I disable the GCE Ingress controller?

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.