Backend Protocol

Experimental Channel in v1.0.0+

This concept is part of the Experimental Channel in v1.0.0+.

Not all implementations of Gateway API support automatic protocol selection. In some cases protocols are disabled without an explicit opt-in.

When a Route’s backend references a Kubernetes Service, application developers can specify the protocol using ServicePort appProtocol field.

For example the following store Kubernetes Service is indicating the port 8080 supports HTTP/2 Prior Knowledge.

  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: store
  5. spec:
  6. selector:
  7. app: store
  8. ports:
  9. - protocol: TCP
  10. appProtocol: kubernetes.io/h2c
  11. port: 8080
  12. targetPort: 8080

Currently, Gateway API has conformance testing for:

  • kubernetes.io/h2c - HTTP/2 Prior Knowledge
  • kubernetes.io/ws - WebSocket over HTTP