Skip to content

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

SettingWhy
ingress.enabled=trueThe gateway is published through the main ingress.
ingress.hostThe host name agents connect to, on port 443.
ingress.tlsSecretNamenginx carries gRPC over HTTP/2, which needs TLS.
agentGateway.service.enabled=true (default)The ClusterIP Service the ingress forwards to.
An nginx ingress controllerThe 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

  1. 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-values
    

    Or in a values file:

    agentGateway:
      external:
        enabled: true
        # Extra annotations for the agent gateway Ingress, if your controller needs them.
        annotations: {}
    
  2. Wait for the control plane to restart.

  3. Open Admin → Enroll Agent. The Gateway field now reads dq.example.com:443 and Set by this deployment (agentGateway.external)., and step 4 shows a one-line install command.

What the chart changes

ObjectChange
Ingress <fullname>-agent-gatewayNew. 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 planeSets DEVICEQUEST_AGENT_GATEWAY_AUTH=token and DEVICEQUEST_AGENT_GATEWAY_ADVERTISE_ADDR=<ingress.host>:443.
Service <fullname>-agent-gatewayUnchanged: ClusterIP on port 50051 (agentGateway.service.port).
Secret <fullname>-agent-gateway-tlsUnchanged: 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

ValueDefaultDescription
agentGateway.service.enabledtrueCreate the ClusterIP Service for the gateway’s gRPC port.
agentGateway.service.port50051Port of that Service.
agentGateway.external.enabledfalsePublish 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_URL is an https:// URL. The chart sets it from ingress.host.
  • DEVICEQUEST_AGENT_GATEWAY_ADVERTISE_ADDR is set. The chart sets it when agentGateway.external.enabled=true.
  • The control-plane image contains the agent builds and their manifest.json in DEVICEQUEST_AGENT_ARTIFACT_DIR. The published images include linux-amd64, linux-arm64 and windows-amd64.

Install endpoints

EndpointReturns
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 404 with install command not found or expired; ask your admin for a new one.
  • When downloads are off, the response is 503 with agent 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 carries Retry-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.pem to curl and the installer stores it as /etc/devicequest-agent/ca.pem for 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

FromToPortPurpose
Agent hostingress.host443/TCPDownload the installer and binary, and connect to the gateway
Ingress controller<fullname>-agent-gateway Service50051/TCPgRPC to the gateway, inside the cluster

No inbound connection to the agent host is needed.

Verify

  1. On a test host, run the one-command install from Admin → Enroll Agent.
  2. On Linux, run sudo journalctl -u devicequest-agent -f and look for enrollment successful.
  3. Open Admin → Host Agents. The agent is listed as online.