- 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":
- CloudBees CI (CloudBees Core) on Modern Cloud Platforms
- Google Kubernetes Engine (GKE)
- GCE Ingress Controller
- Kubernetes Ingress Nginx Controller
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.
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?