Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Egress GEP #1971

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions geps/gep-1856.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# GEP 1856: Egress Route
Issue: [#1856](https://github.com/kubernetes-sigs/gateway-api/issues/1856)

Status: Provisional
shaneutt marked this conversation as resolved.
Show resolved Hide resolved

## TLDR
Egress traffic is any traffic that originates inside a Kubernetes cluster that is bound for a resource outside of the cluster. Egress Traffic in Kubernetes is a common use case for Service Providers to provision outbound traffic that requires a Gateway resource to provide Source Network Address Translation (SNAT) capabilities.
quangnguyen101 marked this conversation as resolved.
Show resolved Hide resolved

This GEP intends to provide formal rules for how an application can reach an endpoint outside of the cluster via a Gateway. The egress path is protocol agnostic and the Gateway can be connected to multiple external networks.

## Goals
- Provide a standardize configuration for provisioning egress for any protocol through a single Gateway.
- Egress Gateways can be connected to different external networks.
- Provision for using SNAT to allow for identification of cloud-native network functions (CNFs) via engineered IP assignments for security purposes.
- Allow CNFs to be addressed by their external IPs regardless of whether they are being access from within the cluster or from outside the cluster.
quangnguyen101 marked this conversation as resolved.
Show resolved Hide resolved

## Non-Goals
Security functionality should be kept outside this "route". We can have these be referenced as appropriate.
shaneutt marked this conversation as resolved.
Show resolved Hide resolved

IP address management for SNATing will not duplicate non-trivial IPAM (IP address management) capabilities, only simple capability will be provided here.

Potential future use cases such as:

- Provision for using SNAT to allow for IPv4 to IPv6 translation on the way out of the cluster.
- Allow CNFs using peering protocols like Diameter to function by allowing connections to originate in either direction.
- Allow attaching policies (specifics to come later).
shaneutt marked this conversation as resolved.
Show resolved Hide resolved

## Introduction
There are a number of scenarios where it is very useful to control and direct access to multiple external network domains. This is explained, in some detail for Telco use cases in the linked document, below, but it is also true for other scenarios – for example, any time you have an isolated network (vlan, vrf, etc.) that should be accessed by certain apps on not others. An example might be a front-end server that is exposed to the Internet versus a back-end database that is isolated.

Telco use cases: https://docs.google.com/document/d/13xAF_pqH2bV8x4MfXWde47esCdVwow1-nig6iy_rafA/edit

When there are multiple external networks involved, there needs to be a model for how to control access to the different networks. The suggested model in this GEP is to allow the Infrastructure Provider to define what networks are available for a Gateway Class. Each Gateway instantiated would then connect to a single one of the networks, with those Gateways allowing routes to/from defined K8S namespaces. This allows the Cluster Operator to control who accesses each of the external networks. In the model, the application developers need only to request routes to/from the right Gateways.
quangnguyen101 marked this conversation as resolved.
Show resolved Hide resolved

![EgressRoute Gateway API](images/1856-egressroute-highlevel.png)

Diagram: EgressRoute with Highlevel Gateway API
shaneutt marked this conversation as resolved.
Show resolved Hide resolved

Beyond connecting to multiple external network domains, it is very important in many scenarios (specifically including Telco) to be able to identify individual applications egressing a cluster, based on the source IP. In scenarios where firewalls and access control lists (ACLs) are in use, it is standard to control access based on source/destination IP addresses. For those firewall policies to be meaningful, it is vital for application traffic to be individually identifiable, based on source IP. Because of this, controlling the source IP (SNAT) on egressing traffic is a key use case.
shaneutt marked this conversation as resolved.
Show resolved Hide resolved

## API
(... details, can point to PR with changes)

## Alternatives
(List other design alternatives and why we did not go in that direction)

## References
(Add any additional document links. Again, we should try to avoid too much content not in version control to avoid broken links)
Binary file added geps/images/1856-egressroute-highlevel.png
quangnguyen101 marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.