Sidecar deployment is the original method of deployment for Kong Ingress Controller. Both the controller and Kong Gateway are deployed in a single Pod and each Kong Gateway instance is managed by a different Kong Ingress Controller.
This is the simplest deployment method as everything is contained in a single deployment and the controller can communicate with Kong Gateway on localhost
.
Sidecar deployments have been deprecated in favor of Gateway Discovery for multiple reasons:
- Reduce resource usage as the number of Kong Ingress Controller instances does not scale linearly with Kong Gateway.
- Reduce load on the Kubernetes API server. There are fewer clients, and no thrashing behaviour as multiple controllers argue of the
programmed
state of a resource. - Scale Kong Ingress Controller and Kong Gateway independently as needed.
flowchart LR A1[Ingress Controller] A2[
Ingress Controller] A3[
Ingress Controller] B1[
Data Plane] B2[
Data Plane] B3[
Data Plane] C[
API Server] subgraph Pod 3 A1 --> B1 end subgraph Pod 2 A2 --> B2 end subgraph Pod 1 A3 --> B3 end C -.KIC watches API server.- A1 & A2 & A3
Figure 1: In a sidecar deployment, each Pod gets its own Kong Ingress Controller, which sends configuration to its own Kong Gateway instance.
Sidecar deployments are officially supported, but discouraged. We recommend using Gateway Discovery going forwards.