Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

🏠 Back to Blog

Gateway API

  • Limitations of traditional ingress

    • cannot match on headers, query params, methods, etc.
    • no websocket support
    • no rate limiting
    • no gprc support
    • etc….
  • Gateway API

    • GatewayClass

      • Defines what type of gateway controller will be used
      • Spec Example:
          apiVersion: gateway.networking.k8s.io/v1
          kind: GatewayClass
          metadata:
            name: example-class
          spec:
            controllerName: example.com/gateway-controller
        
    • Gateway

      • An instance of the gateway
      • Example spec:
      apiVersion: gateway.networking.k8s.io/v1
      kind: Gateway
      metadata:
        name: example-gateway
        namespace: example-namespace
      spec:
        gatewayClassName: example-class
        listeners:
        - name: http
          protocol: HTTP
          port: 80
          hostname: "www.example.com"
          allowedRoutes:
            namespaces:
              from: Same
      
    • Enable GatewayAPI in Cilium

      • nodePort must be set to true
      • gatewayAPI must be set to true
      • Example:
        
        
        
      • You must the install CRDs for Gateway API: https://gateway-api.sigs.k8s.io/guides/getting-started/introduction/#installing-gateway-api
      • GatewayAPI and Ingress can run side-by-side
    • useful commands

    kubectl get gatewayclass