Error with Traefik on Google Kubernetes Engine

google kubernetes engine custom domain
websocket kubernetes
kubernetes https
kubernetes route
kubernetes https service
kubernetes static ip
reserve static ip kubernetes
google domain static ip

I'm trying to deploy Traefik as an ingress controller on my GKE cluster. It's a basic cluster with 3 nodes.

I'm used to deploy Traefik using manifest on a Kubernetes cluster deployed by Kubespray, but we are migrating some of our infrastructures to GCP.

So I tried to deploy Traefik using the community helm chart with the following configuration:

image: traefik
imageTag: 1.6.2

serviceType: LoadBalancer
loadBalancerIP: X.X.X.X

kubernetes:
  ingressClass: traefik

ssl:
  enabled: false
  enforced: false
  insecureSkipVerify: false

acme:
  enabled: false
  email: hello@mydomain.com
  staging: true
  logging: false
  challengeType: http-01

dashboard:
  enabled: true
  domain: traefik.mydomain.com
  ingress:
    annotations:
      kubernetes.io/ingress.class: traefik

gzip:
  enabled: true
accessLogs:
  enabled: true
  format: common 

And then launch it with the following command:

helm install --namespace kube-system --name traefik --values values.yaml stable/traefik

All is well deployed on my K8S cluster, except the dashboard-ingress with the following error:

kevin@MBP-de-Kevin ~/W/g/s/traefik> kubectl describe ingress traefik-dashboard -n kube-system
Name:             traefik-dashboard
Namespace:        kube-system
Address:
Default backend:  default-http-backend:80 (10.20.2.6:8080)
Rules:
  Host                      Path  Backends
  ----                      ----  --------
  traefik.mydomain.com
                               traefik-dashboard:80 (10.20.1.14:8080)
Annotations:
Events:
  Type     Reason  Age   From                     Message
  ----     ------  ----  ----                     -------
  Warning  Sync    4m    loadbalancer-controller  googleapi: Error 400: Invalid value for field 'namedPorts[2].port': '0'. Must be greater than or equal to 1, invalid

Any idea where is my error?

Thanks a lot!

Invalid value for field 'namedPorts[0].port': '0'

This error happens when the Service that's being used by GKE Ingress is of type ClusterIP (and not NodePort). GKE Ingress requires backing Services to be of type NodePort.

Setting up HTTP(S) Load Balancing with Ingress, Invalid value for field 'namedPorts[0].port': '0'. This error happens when the Service that's being used by GKE Ingress is of type ClusterIP (and not NodePort ). Google Kubernetes Engine is a great and easy way to explore Kubernetes without having to worry about creating a cluster on your own. While playing around with it, I immediately started asking

This can also happen when the service that the ingress controller expects does not exists. (maybe it was accidentally deleted)

nginx-ingress-controller on gke works with services exposed as clusterIP

Working HTTPS example for GKE? · Issue #960 · containous/traefik , Google Kubernetes Engine (GKE) offers integrated support for two types of In the meanwhile, you may get errors such as HTTP 404 or HTTP 500 until the load​  If your cluster is running Kubernetes version 1.9.x, the automatic firewall rules have changed to disallow workloads in a GKE cluster to initiate communication with other Compute Engine VMs that are outside the cluster but on the same network.

you have forgotten to enable rbac.

Sample bellow worked fine

serviceType: LoadBalancer
rbac:
  enabled: true
dashboard:
  enabled: true
  domain: dash.example.com
  ingress:
    annotations:
      kubernetes.io/ingress.class: traefik
kubernetes:
  ingressClass: traefik
  namespaces:
    - default
    - kube-system

[BUG] v2 Dashboard & Redirect + Middleware with no effects · Issue , Hi, I am on Google Container Engine and I am trying to get the HTTPS "--​kubernetes" flag for ingress to work; Traefik will be showing errors  Google Kubernetes Engine (GKE) provides a built-in and managed Ingress controller called GKE Ingress. This controller implements Ingress resources as Google Cloud Load Balancers for HTTP(S) workloads in GKE.

GKE using Traefik as the ingress controller, My goal is to use Traefik v2.0 into GKE Where my full kubernetes manifest for my Google Kubernetes Engine cluster based on official  Kubernetes allows you to specify how much CPU and memory (RAM) each container needs, which is used to better organize workloads within your cluster. Container isolation Use GKE Sandbox for a second layer of defense between containerized workloads on GKE for enhanced workload security.

Traefik Ingress Controller on Google Cloud Kubernetes Engine , I recently fall into a trap using Traefik as the ingress controller in one had nothing to do with the problem, as most of the times, it was something Original: https://cloud.google.com/kubernetes-engine/docs/concepts/network-  Google Kubernetes Engine provides a managed environment for deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment consists of multiple machines (specifically, Google Compute Engine instances) grouped together to form a cluster. GKE clusters are powered by the Kubernetes open source

Traefik on google kubernetes engine, Google Cloud Kubernetes Engine (GKE) is a great and easy way to start exploring the Duration: 1:05:33 Posted: Nov 22, 2018 How about getting them all together and deploying Spring Boot Microservices to Kubernetes Clusters created on Google Cloud Platform using Google Kubernetes Engine (GKE)? In this hands-on course, we will use Docker and Kubernetes to deploy a variety of Spring Boot Applications on Google Cloud using Google Kubernetes Engine: REST APIs – Hello World

Comments
  • Hi traefik-dashboard:80 (10.20.1.14:8080) Why is there two different Port?
  • Hey thanks for your answer! Yes I think this is related to the traefik dashboard handle by the GKE ingress. But this is weird because I tried to specify the ingress class with the following annotation: kubernetes.io/ingress.class: traefik Any idea on why the ingress is ignoring the annotation?
  • Traefik should definitely respect that annotation (and GKE's Ingress controller should definitely ignore such Ingresses then). Could you please share your dashboard's Ingress spec (in case this is still relevant to you)?