Edit this Page

Using xDS gRPC

This page explains how to enable xDS gRPC usage in your Quarkus application.

This Quarkus xDS gRPC integration currently doesn’t support building native executables due to the issues with shaded grpc-netty library while running native IT tests.

Configuring your project

Add the Quarkus gRPC xDS extension to your build file:

pom.xml
<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-grpc-xds</artifactId>
</dependency>
build.gradle
implementation("io.quarkus:quarkus-grpc-xds")
This transitively adds io.quarkus:quarkus-grpc extension dependency.

Server configuration

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

Explicitly enable use of XDS.

Environment variable: QUARKUS_GRPC_SERVER_XDS_ENABLED

Show more

boolean

false

Use secure credentials.

Environment variable: QUARKUS_GRPC_SERVER_XDS_SECURE

Show more

boolean

false

Server configuration example

To enable server xDS, use the following configuration.

xDS must be explicitly enabled on the server, then verify you use it on the right xDS server port (default is 9000). If you want to use XdsServerCredentials set xds.secure to true.

quarkus.grpc.server.xds.enabled=true
#quarkus.grpc.server.xds.secure=true
quarkus.grpc.server.port=30051
When xDS is configured, plain-text is automatically disabled.

Client configuration

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

Explicitly enable use of XDS.

Environment variable: QUARKUS_GRPC_CLIENTS__CLIENT_NAME__XDS_ENABLED

Show more

boolean

false

Use secure credentials.

Environment variable: QUARKUS_GRPC_CLIENTS__CLIENT_NAME__XDS_SECURE

Show more

boolean

false

Optional explicit target.

Environment variable: QUARKUS_GRPC_CLIENTS__CLIENT_NAME__XDS_TARGET

Show more

string

When xDS target property is used, name resolver, host, and port are not used

Client configuration example

To enable client xDS, use the following configuration.

You can either explicitly enable xDS or you use xds name resolver, and make sure you point it to the right xDS server port (default is 9000). If you want to use XdsChannelCredentials set xds.secure to true.

#quarkus.grpc.clients.<client-name>.xds.enabled=true
#quarkus.grpc.clients.<client-name>.xds.secure=true
quarkus.grpc.clients.<client-name>.name-resolver=xds
quarkus.grpc.clients.<client-name>.port=30051
When xDS is configured, plain-text is automatically disabled.

Kubernetes configuration example

Below is an example of (required) additional configuration when using xDS gRPC with the Istio Service Mesh in Kubernetes.

quarkus.kubernetes.ports.grpc.container-port=30051
quarkus.kubernetes.annotations."inject.istio.io/templates"=grpc-agent
quarkus.kubernetes.annotations."proxy.istio.io/config"={"holdApplicationUntilProxyStarts": true}

Related content