Does AGC support HTTP/2 Prior knowledge mode?

Kamil Grebenicek 60 Reputation points
2025-04-08T23:33:52.84+00:00

Hi,

I aim to configure SSL offloading on AGC (Application Gateway for Containers) and communicate between the AGC and our GRPC backend services in cleartext. Since GRPC requires HTTP/2 for communication, I effectively need h2c (HTTP/2 over cleartext) on the upstream/backend side. Our GRPC services are written in ASP.NET Core and run on Kestrel. According to the Kestrel documentation, to accept h2c I need to set HTTP/2 as the endpoint protocol, and the client must support the Prior knowledge mode.

Gateway API introduced the appProtocol field, which can be set to kubernetes.io/h2c on a K8s service resource. If I understand its purpose correctly, it's supposed to solve the use case.

https://gateway-api.sigs.k8s.io/guides/backend-protocol/

The question is whether AGC currently either respects the appProtocol field or supports HTTP/2 Prior knowledge mode in another way.

Thank you.

Azure Kubernetes Service
Azure Kubernetes Service

An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.


Answer accepted by question author
Arko 4,180 Reputation points Moderator
2025-04-09T05:27:57.52+00:00

Hello Kamil Grebenicek, if I am understanding your question correctly you are asking if AGC can talk to backend gRPC services over plain HTTP/2 (h2c), and does it support the Kubernetes appProtocol: kubernetes.io/h2c setting?

if so then as of now, Azure Application Gateway for Containers (AGC) does not officially document support for HTTP/2 Prior Knowledge mode (h2c) for upstream (backend) communication.

While AGC does support gRPC, which operates over HTTP/2, the Microsoft documentation only references gRPC support through the Gateway API and GRPCRoute resources-

"gRPC is only supported using Gateway API for Application Gateway for Containers."

checkout this document- Microsoft Docs: gRPC on AGC

enter image description here

However, the AGC documentation does not currently mention support for HTTP/2 Prior Knowledge mode (h2c) or for Kubernetes appProtocol (let's say appProtocol: kubernetes.io/h2c)

Even though the Kubernetes Gateway API documentation defines the appProtocol (including kubernetes.io/h2c) for indicating HTTP/2, AGC's implementation has not yet advertised conformance or support for this capability.

If your scenario requires cleartext HTTP/2 (h2c) to backend ASP.NET Core (Kestrel) services, you may need to place an intermediary (like an Envoy or NGINX proxy) that can handle TLS from AGC and speak h2c to Kestrel.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.