Skip to main content

Services Management in Kubernetes

In Kubernetes, an IngressRoute or an Ingress can refer to either a Kubernetes Service, or a TraefikService.

Kubernetes Services

A Kubernetes Service allows sending the requests to the pods that contain the API or application to reach.

When you set a Kubernetes Service as a Service in your IngressRoute, or Ingress, Traefik Hub API Gateway gets the IP address of the pods attached to this Service to manage the load-balancing the requests between the pods.

"Native Load-Balancing"

Traefik Hub API Gateway, allows you to use the Kubernetes Service load-balancing using the option nativelb that can be set either at the provider level (KubernetesCRD, or KubernetesIngress) or at the service level (using an IngressRoute option or Service annotation).

To customize the connection between an IngressRoute and a Kubernetes Service, you can set values to the Service options direcctly in the IngressRoute as described in its Configuration Options section.

To customize the connection between an Ingress and a Kubernetes Service, you can set the traefik.ingress.kubernetes.io/service annotations described in the dedicated section.

Traefik Services

A TraefikService is a Traefik Hub API Gateway Custom Resource that can be put on top of the Kubernetes Services. It brings advanced load-balancing feature such as a Weighted Round Robin load balancing or a Mirroring between your Kubernetes Services.

To add a WRR or a Mirroring Service, you must create a TraefikService as described in the dedicated section.

Servers Transport

A ServersTransport allows you to configure the connection between Traefik Hub API Gateway and the HTTP servers.

Applying a Serverstransporton a service allow you to override the default ServersTransport behavior.