EgressGateway¶
Overview¶
Persona¶
Application developer
Tenant administrator
Function¶
Declares an egress gateway for a CNE instance, binding a GatewayClass resource, referencing infrastructure configuration in a GatewaySettings resource, and selecting which pods egress through this gateway.
This resource defines how application pods in the selected namespaces send outbound traffic through a specific egress gateway. Key characteristics:
Supports egress through both VLAN and VXLAN encapsulation.
Supports multi-tenancy. Deploy one egress gateway for each tenant.
Creates IPv4 and IPv6 wildcard virtual servers when it has resolved dependencies, matching running pods, and active Traffic Management Microkernel (TMM) devices. When you use Calico with SNAT, the VXLAN IP addresses are the source addresses.
Doesn’t include DNS46, NAT46, or DNS virtual server functionality.
Note
VLAN versus VXLAN is a cluster-wide setting, not configurable for each egress gateway. The mode comes from the singleton Infra resource (spec.egressDefaults) and applies to all egress gateways. To change the encapsulation mode, update the Infra resource.
Names¶
Singular name |
Plural name |
Short name |
|---|---|---|
egressgateway |
egressgateways |
egw |
API group and version¶
gateway.k8s.f5.com/v1alpha1
Scope¶
Namespace
Specification¶
spec¶
Field |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
— |
References the |
|
Yes |
— |
Infrastructure-level configuration for the egress gateway. |
|
Yes |
— |
Defines which pods are selected for egress through this gateway. |
spec.infrastructure¶
Field |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
— |
References a |
spec.infrastructure.parametersRef¶
Field |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
— |
Name of the |
|
Yes |
— |
References a specific section within the |
spec.sourceSelector¶
Field |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
— |
How source pods are selected for egress through this gateway. Accepted values: |
|
No |
— |
Namespace selection criteria. Required when |
|
No |
— |
Pod selection criteria within the selected namespaces. Required when |
spec.sourceSelector.selectionMode behavior
Mode |
Behavior |
Required fields |
|---|---|---|
|
Selects all pods in the specified namespaces. |
|
|
Selects specific pods matched by pod selectors, across all namespaces. |
|
|
Selects pods that satisfy both the namespace and pod selection criteria (intersection). |
|
spec.sourceSelector.namespaces¶
Specify at least one of matchLabels or matchNames. When you specify both, the result is the intersection of all matched namespaces.
Field |
Required |
Default |
Description |
|---|---|---|---|
|
No |
— |
Selects namespaces by label key-value pairs. |
|
No |
— |
Selects namespaces by explicit name. Each name is 1 to 253 characters. Must contain at least one item. |
spec.sourceSelector.pods¶
Specify at least one of matchLabels or matchExpressions. When you specify both, the result is the intersection (pods must satisfy both).
Field |
Required |
Default |
Description |
|---|---|---|---|
|
No |
— |
Selects pods by label key-value pairs. |
|
No |
— |
Selects pods by set-based label expressions. |
spec.sourceSelector.pods.matchExpressions[]¶
Field |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
— |
Label key that the selector applies to. Must be at least one character. |
|
Yes |
— |
The key’s relationship to a set of values. Accepted values: |
|
No |
— |
Array of string values. |
Example manifest¶
The following manifest creates an egress gateway that uses Combined selection to egress the production pods labeled app: web-app and version: v1 in the my-tenant-ns namespace.
apiVersion: gateway.k8s.f5.com/v1alpha1
kind: EgressGateway
metadata:
name: bnk-egress
namespace: f5-gateways
spec:
gatewayClassName: f5-bnk-gateways
infrastructure:
parametersRef:
name: my-gateway-settings
sectionName: default-egress
sourceSelector:
selectionMode: Combined
namespaces:
matchLabels:
tier: production
matchNames:
- my-tenant-ns
pods:
matchLabels:
app: web-app
version: v1