Skip to content

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

Envoy startup settings

Page as Markdown

Pass extra command-line arguments to Envoy, set the Envoy application log format, and tune the DNS resolver for a gateway proxy.

Use the envoyContainer section of the EnterpriseKgatewayParameters resource to change how the Envoy process in a gateway proxy starts.

Prefer the envoyContainer fields over a custom bootstrap, because the Kubernetes API server validates the fields against the CRD schema when you apply the resource, and the fields carry forward when you upgrade. For a bootstrap setting that the EnterpriseKgatewayParameters resource does not expose as a field, such as histogram bucket settings, see Custom Envoy bootstrap config.

A custom bootstrap ConfigMap replaces the bootstrap ConfigMap that the control plane generates, so the bootstrap.logFormat and bootstrap.dnsResolver fields have no effect while you use a custom bootstrap.

The control plane renders the following fields as arguments on the Envoy container of the proxy Deployment, or as settings in the bootstrap ConfigMap that the proxy reads at startup.

FieldDescription
extraArgsPass extra command-line arguments to the Envoy binary, such as --concurrency to set the number of worker threads. The control plane appends these arguments after the arguments that it manages. The control plane already manages the --disable-hot-restart, --service-node, --log-level, and --component-log-level flags, so do not set these flags in extraArgs. To change the log levels, use the bootstrap.logLevel and bootstrap.componentLogLevels fields. To change another managed flag, use a deploymentOverlay. This field takes effect in version 2.3.3 and later. In versions 2.3.0 through 2.3.2, the control plane accepts the field but does not apply it to the gateway proxy.
bootstrap.logLevelSet the Envoy log level, such as info or debug. The control plane passes the value to Envoy as the --log-level argument. If you omit this field, the log level is info.
bootstrap.logFormatSet the format of the Envoy application logs, either as a json object or as a text format string. The setting does not change the access log format. This field takes effect in version 2.3.3 and later. In versions 2.3.0 through 2.3.2, the control plane accepts the field but does not apply it to the gateway proxy.
bootstrap.dnsResolver.udpMaxQueriesSet the maximum number of DNS queries that Envoy sends on one UDP channel before it opens a new one, which spreads queries across DNS resolvers. If you omit this field, the limit is 100. Set the field to 0 to remove the limit. This field takes effect in version 2.3.3 and later. In versions 2.3.0 through 2.3.2, the control plane accepts the field but does not apply it to the gateway proxy.

For the other built-in envoyContainer fields, see Customization options.

Before you begin

Follow the Get started guide to install Solo Enterprise for kgateway.

Configure the startup settings

  1. Create an EnterpriseKgatewayParameters resource with your startup settings. The following example runs Envoy with 2 worker threads, writes JSON application logs, and lowers the DNS query limit to 50.

    kubectl apply -f- <<'EOF'
    apiVersion: enterprisekgateway.solo.io/v1alpha1
    kind: EnterpriseKgatewayParameters
    metadata:
      name: startup-params
      namespace: kgateway-system
    spec:
      kube:
        envoyContainer:
          extraArgs:
          - --concurrency
          - "2"
          bootstrap:
            logLevel: info
            logFormat:
              json:
                time: "%Y-%m-%dT%T.%e"
                level: "%l"
                logger: "%n"
                message: "%j"
            dnsResolver:
              udpMaxQueries: 50
    EOF
  2. Create a Gateway that references the EnterpriseKgatewayParameters resource in the spec.infrastructure.parametersRef field.

    kubectl apply -f- <<EOF
    apiVersion: gateway.networking.k8s.io/v1
    kind: Gateway
    metadata:
      name: startup-settings
      namespace: kgateway-system
    spec:
      gatewayClassName: enterprise-kgateway
      infrastructure:
        parametersRef:
          group: enterprisekgateway.solo.io
          kind: EnterpriseKgatewayParameters
          name: startup-params
      listeners:
      - name: http
        protocol: HTTP
        port: 8080
    EOF
  3. Verify that the gateway proxy starts with your settings.

    1. Check the arguments of the Envoy container.

      kubectl get deployment startup-settings -n kgateway-system \
        -o jsonpath='{.spec.template.spec.containers[0].args}'

      Example output:

      ["--disable-hot-restart","--service-node","$(POD_NAME).$(POD_NAMESPACE)","--log-level","info","--concurrency","2"]
      
    2. Check that Envoy writes its application logs in JSON format.

      kubectl logs deployment/startup-settings -n kgateway-system -c kgateway-proxy --tail=1

      Example output:

      {"message":"all dependencies initialized. starting workers","time":"2026-10-01T13:43:27.408","logger":"config","level":"info"}
      
    3. Check the DNS query limit in the bootstrap configuration of the gateway proxy.

      kubectl get configmap startup-settings -n kgateway-system -o yaml | grep udp_max_queries

      Example output:

              udp_max_queries: 50
      

Clean up the startup settings

You can optionally remove the resources that you set up as part of this guide.
kubectl delete gateway startup-settings -n kgateway-system
kubectl delete ekgpar startup-params -n kgateway-system
Was this page helpful?