Skip to content

Custom Envoy Bootstrap Configuration

Custom Envoy Bootstrap Configuration is a technique used within service meshes (such as Istio) to override the default startup parameters of the Envoy proxy. This allows operators to modify proxy behavior by injecting a specific configuration file provided via a Kubernetes ConfigMap.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md]

Implementation

To implement a custom bootstrap, the process involves two primary resources: a ConfigMap containing the Envoy configuration and an annotated application deployment.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md]

The specific mechanism to trigger the custom bootstrap is the application of the sidecar.istio.io/bootstrapOverride annotation to the Pod. The value of this annotation must correspond to the name of the ConfigMap containing the custom configuration.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md]

Deployment Steps

  1. Create the ConfigMap resource: kubectl apply -f custom-bootstrap.yaml^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md]
  2. Deploy the application with the annotation: kubectl apply -f example-app.yaml^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md]
  3. If Automatic sidecar injection is not enabled, manual injection using istioctl kube-inject is required before applying the manifest.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md]

Configuration Behavior

The custom configuration is passed to the Envoy process using the --config-yaml flag.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md]

The resulting configuration is a merge between the custom input and the default bootstrap configuration provided by the mesh.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md] The merge logic functions as follows:

  • Singular values: Custom values will replace the default values.
  • Repeated values: Custom values will be appended to the default values.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md]

Verification

To verify which bootstrap configuration is currently active on a specific Pod, the following command can be used to dump the configuration:

bash [istioctl](<./istioctl.md>) proxy-config bootstrap <POD-NAME>^[400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md]

Sources

  • 400-devops-07-monitoring-and-observability-k8s-istio-samples-custom-bootstrap-readme.md