> ## Content Index
> Fetch the complete content index at: https://www.sredevops.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# kgateway: An amazing tool to simplify traffic management using Kubernetes API Gateway
- URL: https://www.sredevops.org/en/kgateway-an-amazing-tool-to-simplify-traffic-management-using-kubernetes-api-gateway/
- Published: 2025-03-24T07:28:42.000Z
- Updated: 2025-12-10T01:05:29.000Z
- Author: Nicolás Georger
- Tags: Kubernetes, Cloud, Apps, Microservicios, News, Open Source, English, #en

Kgateway is a feature-rich, fast, and flexible Kubernetes-native ingress controller and next-generation API gateway. Built on top of the robust [Envoy proxy](https://www.envoyproxy.io/?ref=sredevops.org) and the Kubernetes Gateway API, Kgateway acts as a reverse proxy, providing a crucial security barrier between your clients and the microservices that constitute your application. 

## Kgateway's Superpowers

Kgateway isn't just another API gateway; it's fully compliant with the Kubernetes Gateway API and extends its functionality with custom Gateway APIs like `RoutePolicies`, `ListenerPolicies`, and `Backends`. These resources allow for centralized configuration of advanced traffic management, security, and resiliency rules for an `HTTPRoute` or Gateway listener. In simpler terms, Kgateway gives you more control and flexibility over how traffic flows through your Kubernetes cluster.

![](https://www.sredevops.org/content/images/2025/03/image.png)

## Extensions and integrations

The kgateway project offers a range of extensions on top of the Kubernetes Gateway API, enabling advanced routing, security, and resiliency capabilities. Some of these extensions include:

- [Access logging Security](https://kgateway.dev/docs/security/access-logging/?ref=sredevops.org): Keep tabs on who's accessing what.
- [AWS ALB and NLB Traffic](https://kgateway.dev/docs/setup/customize/aws-elb/?ref=sredevops.org): Seamlessly integrate with AWS load balancers.
- [AWS Lambda Traffic](https://kgateway.dev/docs/traffic-management/destination-types/backends/lambda?ref=sredevops.org): Route traffic to serverless functions.
- [Buffering Traffic](https://kgateway.dev/docs/traffic-management/buffering/?ref=sredevops.org): Manage traffic spikes like a pro.
- [Delegation Traffic](https://kgateway.dev/docs/traffic-management/route-delegation/?ref=sredevops.org): Delegate routing decisions for more granular control.
- [Direct responses Traffic](https://kgateway.dev/docs/traffic-management/direct-response/?ref=sredevops.org): Send direct responses without hitting a backend.
- [Gateway customization Setup](https://kgateway.dev/docs/setup/customize/?ref=sredevops.org): Tailor the gateway to your specific needs.
- [Integrations Setup](https://kgateway.dev/docs/integrations/?ref=sredevops.org): Integrate with other tools and services.
- [Mirroring Resiliency](https://kgateway.dev/docs/resiliency/mirroring/?ref=sredevops.org): Mirror traffic for testing and debugging.
- [Transformations Traffic](https://kgateway.dev/docs/traffic-management/transformations/?ref=sredevops.org): Modify requests and responses on the fly.

## Default Gateway Proxy Setup: The Magic Behind the Scenes

When you create a Kubernetes Gateway resource, Kgateway automatically spins up, bootstraps, and manages gateway proxy deployments. This magic is achieved through a combination of Kgateway and Kubernetes resources, including `GatewayClass`, `GatewayParameters`, and a gateway proxy template that includes the Envoy configuration for each proxy.

For a deeper dive into the default setup and how these resources interact, check out the [Default gateway proxy setup](https://kgateway.dev/docs/setup/default/?ref=sredevops.org).

**Example of a `GatewayClass`:**

```yaml
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
  name: kgateway
spec:
  controllerName: kgateway.dev/kgateway
  description: KGateway Controller
  parametersRef:
    group: gateway.kgateway.dev
    kind: GatewayParameters
    name: kgateway
    namespace: kgateway-system
```

## Deployment Patterns: Choose how to route your traffic

Kgateway's flexibility allows you to deploy it in a way that best suits your environment. Here are some recommended deployment patterns:

### Simple Ingress: The Classic Approach

![Kgateway as a simple ingress](https://kgateway.dev/img/pattern-simple-ingress.svg)

In this setup, a single Kgateway proxy serves as the ingress API gateway for all workloads in a Kubernetes cluster. It's centrally managed by the Kgateway control plane and configured to match and forward traffic based on your defined rules. This is a great starting point for smaller environments where all workloads run in a single cluster.

### Sharded Gateway: Divide and Conquer

![Kgateway as a sharded gateway](https://kgateway.dev/img/pattern-sharded-gateway.svg)

For larger environments or those with both high and low traffic services, a sharded gateway can help isolate services and protect against noisy neighbors. Multiple gateway proxies split the traffic for different services, providing better load balancing and isolation.

### Sharded Gateway with Central Ingress: The Best of Both Worlds

![Sharded gateway with central ingress](https://kgateway.dev/img/pattern-central-ingress-gloo.svg)

This pattern combines a central ingress gateway proxy with a second layer of sharded gateway proxies. The central gateway applies common traffic management, resiliency, and security rules, while the second layer handles traffic for specific apps, teams, or namespaces. This is ideal if you need a central IP address and DNS name for the gateway that serves all your traffic.

Kgateway can also be paired with other proxy types, such as HAProxy or AWS NLB/ALB, as your central ingress endpoint.

![Central ingress with any proxy](https://kgateway.dev/img/pattern-central-ingress-any.svg)

### API Gateway for a Service Mesh: Istio Ambient Mesh Integration

![API gateway for Istio ambient mesh](https://kgateway.dev/img/ambient-ingress.svg)

Kgateway can be deployed as an ingress, egress, or waypoint proxy gateway for workloads in an Istio ambient mesh. This allows you to leverage Kgateway's features within your service mesh environment.

For more details, refer to the guides for using Kgateway as an [ingress](https://kgateway.dev/docs/integrations/istio/ambient/ambient-ingress/?ref=sredevops.org) or [waypoint proxy](https://kgateway.dev/docs/integrations/istio/ambient/waypoint/?ref=sredevops.org) for your ambient mesh.

## Kubernetes Gateway API Success with kgateway

Kgateway is a powerful and versatile tool for managing traffic in your Kubernetes environment. Whether you're running a small cluster or a large, complex infrastructure, Kgateway provides the features and flexibility you need to ensure secure, reliable, and efficient communication between your services. So, go ahead and give Kgateway a try – your microservices will thank you!

## Learn more

[kgatewayKgateway is a feature-rich, fast, and flexible API gateway that is built on top of Envoy proxy and the Kubernetes Gateway API. It excels in function-level routing, supports legacy apps, microservices and serverless, offers robust discovery capabilities, integrates seamlessly with open-source projects, and is designed to support hybrid applications with various technologies, architectures, protocols, and clouds.![](https://www.sredevops.org/content/images/icon/apple-touch-icon-29.png)![](https://www.sredevops.org/content/images/thumbnail/use-case-security.svg)](https://kgateway.dev/?ref=sredevops.org)

[WelcomeKgateway is a feature-rich, fast, and flexible API gateway that is built on top of Envoy proxy and the Kubernetes Gateway API. It excels in function-level routing, supports legacy apps, microservices and serverless, offers robust discovery capabilities, integrates seamlessly with open-source projects, and is designed to support hybrid applications with various technologies, architectures, protocols, and clouds.![](https://www.sredevops.org/content/images/icon/apple-touch-icon-30.png)![](https://www.sredevops.org/content/images/thumbnail/logo.svg)](https://kgateway.dev/docs/?ref=sredevops.org)