Documentation
Kubernetes agent gateway
Expose the agent gateway of a Kubernetes deployment through the ingress on port 443 so agents on customer networks can enroll with one command.
Overview
On Kubernetes, the DeviceQuest Helm chart runs the agent gateway inside the control plane. By default its gRPC port is reachable only inside the cluster. Set agentGateway.external.enabled=true and the chart publishes the gateway through your existing ingress host on port 443, switches it to token authentication, and turns on the one-command agent install on Admin → Enroll Agent. Agents then need only outbound HTTPS to your DeviceQuest host.
This page is for the operator who installs DeviceQuest with Helm.
How it works
Agent host ──HTTPS 443──▶ ingress (TLS) ──GRPCS──▶ <release>-agent-gateway:50051 ──▶ control plane
/api/v1/agent/install.sh|ps1, /api/v1/agent/download/<platform> (install and download)
/devicequest.gateway.v1.AgentGateway (agent gateway, gRPC)
- The agent checks the ingress certificate with the host’s trust store, or with your CA file.
- The ingress forwards gRPC to the gateway over TLS (
backend-protocol: GRPCS), using the certificate the chart generates for the gateway. - Each agent authenticates with its own token, issued at enrollment. No client certificates are needed.
- The control plane serves the install scripts and agent binaries itself, gated by the one-time bootstrap credential in the URL.
Requirements
| Setting | Why |
|---|---|
ingress.enabled=true | The gateway is published through the main ingress. |
ingress.host | The host name agents connect to, on port 443. |
ingress.tlsSecretName | nginx carries gRPC over HTTP/2, which needs TLS. |
agentGateway.service.enabled=true (default) | The ClusterIP Service the ingress forwards to. |
| An nginx ingress controller | The chart uses nginx annotations for gRPC. |
If one is missing, helm upgrade stops with a message such as agentGateway.external.enabled requires ingress.tlsSecretName: nginx carries gRPC over HTTP/2, which needs TLS.
Enable external agents
Add the setting to your Helm install:
helm upgrade --install devicequest oci://harbor.cyberquest.cloud/helm/devicequest --version <version> \ --namespace <ns> \ --set-string ingress.host=dq.example.com \ --set-string ingress.tlsSecretName=<tls-secret> \ --set agentGateway.external.enabled=true \ --reuse-valuesOr in a values file:
agentGateway: external: enabled: true # Extra annotations for the agent gateway Ingress, if your controller needs them. annotations: {}Wait for the control plane to restart.
Open Admin → Enroll Agent. The Gateway field now reads
dq.example.com:443and Set by this deployment (agentGateway.external)., and step 4 shows a one-line install command.
What the chart changes
| Object | Change |
|---|---|
Ingress <fullname>-agent-gateway | New. Routes the path /devicequest.gateway.v1.AgentGateway on ingress.host to the gateway Service, with nginx.ingress.kubernetes.io/backend-protocol: GRPCS and 3600-second read and send timeouts for the long-lived command stream. Uses the same TLS secret as the main ingress. |
| Control plane | Sets DEVICEQUEST_AGENT_GATEWAY_AUTH=token and DEVICEQUEST_AGENT_GATEWAY_ADVERTISE_ADDR=<ingress.host>:443. |
Service <fullname>-agent-gateway | Unchanged: ClusterIP on port 50051 (agentGateway.service.port). |
Secret <fullname>-agent-gateway-tls | Unchanged: the gateway CA and server certificate, generated once and kept across upgrades. |
In saas mode the gateway always runs with TLS. Without agentGateway.external.enabled, it uses mutual TLS for agents inside the cluster. Add extra DNS names to the generated gateway certificate with agentGateway.tls.extraDnsNames.
Helm values
| Value | Default | Description |
|---|---|---|
agentGateway.service.enabled | true | Create the ClusterIP Service for the gateway’s gRPC port. |
agentGateway.service.port | 50051 | Port of that Service. |
agentGateway.external.enabled | false | Publish the gateway through the ingress on 443 and switch to token authentication. |
agentGateway.external.annotations | {} | Extra annotations for the agent gateway Ingress. |
agentGateway.tls.extraDnsNames | [] | Extra DNS names for the generated gateway certificate. |
One-command install requirements
The one-command install is on when all of these are true. Otherwise the Enroll Agent page shows the manual install script and the note One-command installs are off for this deployment.
- The control plane runs the agent gateway.
DEVICEQUEST_PUBLIC_URLis anhttps://URL. The chart sets it fromingress.host.DEVICEQUEST_AGENT_GATEWAY_ADVERTISE_ADDRis set. The chart sets it whenagentGateway.external.enabled=true.- The control-plane image contains the agent builds and their
manifest.jsoninDEVICEQUEST_AGENT_ARTIFACT_DIR. The published images includelinux-amd64,linux-arm64andwindows-amd64.
Install endpoints
| Endpoint | Returns |
|---|---|
GET /api/v1/agent/install.sh?token=<credential> | The Linux installer, with your URL, gateway, credential and the SHA-256 of each build filled in. |
GET /api/v1/agent/install.ps1?token=<credential> | The Windows installer. |
GET /api/v1/agent/download/<platform>?token=<credential> | The agent binary for linux-amd64, linux-arm64 or windows-amd64, with its SHA-256 in the X-Checksum-Sha256 header. |
- The token must be an active, unexpired bootstrap credential. Otherwise the response is
404withinstall command not found or expired; ask your admin for a new one. - When downloads are off, the response is
503withagent downloads are not configured on this deployment. - The control plane allows 120 requests a minute per connecting address. Behind the ingress, all requests come from the ingress controller, so every host shares that budget, and each install makes 2 requests. Plan rollouts at up to about 60 hosts a minute; on
429, wait 60 seconds and retry (the response carriesRetry-After: 60). - Responses are sent with
Cache-Control: no-store.
Private certificate authority
If the ingress certificate comes from a private CA, agents must trust that CA:
- Linux: tick The server certificate is from a private CA (I have its ca.pem on the host) on the Enroll Agent page. The command passes
ca.pemtocurland the installer stores it as/etc/devicequest-agent/ca.pemfor the agent. See Install on Linux. - Windows: import the CA into the computer’s Trusted Root Certification Authorities store before you run the install command.
Network requirements
| From | To | Port | Purpose |
|---|---|---|---|
| Agent host | ingress.host | 443/TCP | Download the installer and binary, and connect to the gateway |
| Ingress controller | <fullname>-agent-gateway Service | 50051/TCP | gRPC to the gateway, inside the cluster |
No inbound connection to the agent host is needed.
Verify
- On a test host, run the one-command install from Admin → Enroll Agent.
- On Linux, run
sudo journalctl -u devicequest-agent -fand look forenrollment successful. - Open Admin → Host Agents. The agent is listed as online.