Create an ingress gateway
Create an ingress gateway to manage ingress traffic with the Kubernetes Gateway API.
Creating an ingress gateway with Calico Ingress Gateway
Calico Ingress Gateway is based on Envoy Gateway, an open-source implementation of the Gateway API. Calico provides a simple, convenient way to deploy and manage this implementation.
Creating an ingress gateway with Calico Ingress Gateway involves only a few steps. You need to do the following:
- Enable Calico Ingress Gateway by creating a
GatewayAPIresource. - Create a
Gatewayresource that referencestigera-gateway-class, the name of theGatewayClassresource created by the Tigera Operator. - When you create your gateway routing resources, you refer to this
Gatewayresource.
Limitations
- Calico Ingress Gateway is not supported on Windows nodes.
Prerequisites
- You have an understanding of the Kubernetes Gateway API and know how you want to configure it for your system.
- Calico was installed on your cluster using the Tigera Operator.
- Your cluster is provisioned to support services of type
LoadBalancer.
Create an ingress gateway
-
To enable Gateway API support, create a
GatewayAPIresource with the namedefault:kubectl apply -f - <<EOF
apiVersion: operator.tigera.io/v1
kind: GatewayAPI
metadata:
name: default
EOFThe Tigera Operator pulls and sets up the hardened Envoy Gateway images. This gives you a set of Gateway API resources, including the
GatewayClassresource you need to create your gateway.To verify, you can check to see if the
GatewayClassresource is available:kubectl get gatewayclassExpected outputNAME CONTROLLER ACCEPTED AGE
tigera-gateway-class gateway.envoyproxy.io/gatewayclass-controller True 4mtiptigera-gateway-classis the name of the single defaultGatewayClassresource that is created when you enable Gateway API support. You can define additional gateway classes, along with other customizations, in theGatewayAPIresource. -
Create a
Gatewayresource that is linked totigera-gateway-class.Example snippet of a Gateway resource with default gatewayClassNameapiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: <gateway-name>
spec:
gatewayClassName: tigera-gateway-class
...Replace
<gateway-name>with a name for your gateway. You will refer to this gateway name for all services you want to use the gateway. -
Create a gateway routing resource that refers to your
Gatewayresource as.spec.parentRefs:Example snippet of an HTTPRoute resourceapiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: example-httproute
spec:
parentRefs:
- name: <gateway-name>
...Replace
<gateway-name>with the name of yourGatewayresource.