Skip to content
agentgateway has joined the Agentic AI FoundationLearn more

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

TLS encryption

Page as Markdown

Enable TLS encryption for the control plane xDS gRPC server communications.

Enable server-side TLS encryption for the xDS gRPC server in the agentgateway control plane. For more information about the server, see the Architecture docs.

The control plane serves xDS over TLS by default (controller.xds.mode: tls) and self-manages the certificate: it generates and rotates an internal CA and serving certificate, and propagates the CA bundle to the agentgateway data plane proxies. No cert-manager setup or pre-created secret is required. Optionally, you can bring your own certificate authority.

Before you begin

Install the agentgateway control plane.

Step 1: (Optional) Bring your own certificate authority

The control plane self-manages the xDS certificate, so cert-manager is not required and you can skip to Step 2. To use your own certificate authority instead of the self-signed one that the control plane generates, provide a CA key pair (certificate and key) in the agentgateway-xds-cert secret in the control plane namespace. You might use a provider such as cert-manager to automate issuance and rotation.

Step 2: Update the control plane to use TLS

Upgrade agentgateway with TLS enabled for the controller. For complete steps, review the Upgrade guide.

  1. Set your version of agentgateway in an environment variable, such as the latest patch version (1.6.0-alpha.1).

    export NEW_VERSION=1.6.0-alpha.1
  2. Get the Helm values file for your current version.

    helm get values agentgateway -n agentgateway-system -o yaml > values.yaml
    open values.yaml
  3. Add the following values to the Helm values file to enable TLS for the xDS gRPC server.

    controller:
      xds:
        mode: tls
  4. Upgrade your Helm installation.

    helm upgrade -i -n agentgateway-system agentgateway oci://cr.agentgateway.dev/charts/agentgateway \
      -f values.yaml \
      --version $NEW_VERSION 
  5. Confirm that the agentgateway control plane is up and running.

    kubectl get pods -n agentgateway-system

Step 3: Verify the TLS connection

Now that the control plane is up and running, verify the TLS connection.

  1. Port-forward the control plane service on port 9977.

    kubectl port-forward -n agentgateway-system svc/agentgateway 9978
  2. Send a request to the control plane in plaintext without TLS authentication. You get back an authentication failed error.

    grpcurl -plaintext localhost:9978 list

    Example output:

    Failed to list services: rpc error: code = Unknown desc = authentication failed: [Authenticator KubeJWTAuthenticator: target JWT extraction error: no HTTP authorization header exists]
  3. Port-forward the control plane deployment on port 9092.

    kubectl port-forward -n agentgateway-system deploy/agentgateway 9092
  4. Send a request to the metrics endpoint to check for xds_auth metrics.

    curl localhost:9092/metrics | grep xds_auth

    Example output:

    # HELP kgateway_xds_auth_rq_failure_total Total number of failed xDS auth requests
    # TYPE kgateway_xds_auth_rq_failure_total counter
    kgateway_xds_auth_rq_failure_total 2
    # HELP kgateway_xds_auth_rq_success_total Total number of successful xDS auth requests
    # TYPE kgateway_xds_auth_rq_success_total counter
    kgateway_xds_auth_rq_success_total 1
    # HELP kgateway_xds_auth_rq_total Total number of xDS auth requests
    # TYPE kgateway_xds_auth_rq_total counter
    kgateway_xds_auth_rq_total 3
  5. Check the certificate metrics to monitor the rotation of the xDS serving certificate. Because the control plane self-manages this certificate, these metrics are how you confirm that rotation keeps happening, and alert if it stops.

    curl -s localhost:9092/metrics | grep xds_cert

    Example output:

    # HELP agentgateway_xds_cert_expiry_seconds Expiry timestamp (Unix seconds) of the current xDS serving certificate
    # TYPE agentgateway_xds_cert_expiry_seconds gauge
    agentgateway_xds_cert_expiry_seconds 1.7895646e+09
    # HELP agentgateway_xds_cert_rotation_total Total number of successful xDS certificate rotations
    # TYPE agentgateway_xds_cert_rotation_total counter
    agentgateway_xds_cert_rotation_total 1

    Review the following metrics to monitor certificate health.

    MetricWhat to watch for
    agentgateway_xds_cert_expiry_secondsAlert when the value approaches the current time, such as agentgateway_xds_cert_expiry_seconds - time() < 21600, which is 6 hours of remaining lifetime.
    agentgateway_xds_cert_rotation_totalA counter that increases each time the certificate is rotated successfully.
    agentgateway_xds_cert_rotation_errors_totalA counter that increases each time a rotation fails. Any increase means the certificate is not being renewed. This metric appears only after the first failure.
Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.