Envoy configuration

6/30/2021

I am trying to set up an envoy for k8s. But the envoy service does not start and I see the following error in the log:

"The v2 xDS major version is deprecated and disabled by default.
Support for v2 will be removed from Envoy at the start of Q1 2021.
You may make use of v2 in Q4 2020 by following the advice in https://www.envoyproxy.io/docs/envoy/latest/faq/api/transition "

I understand that I need to rewrite the configuration in v3. I ask for help, as I am not very good at this. Here is my config.

static_resources:
  listeners:
  - name: k8s-controllers-listener
    address:
      socket_address: { address: 0.0.0.0, port_value: 6443 }
    filter_chains:
    - filters:
      - name: envoy.tcp_proxy
        config:
          stat_prefix: ingress_k8s_control
          cluster: k8s-controllers
  clusters:
  - name: k8s-controllers
    connect_timeout: 0.5s
    type: STRICT_DNS
    lb_policy: round_robin
    http2_protocol_options: {}
    load_assignment:
      cluster_name: k8s-controllers
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address: { address: ${CONTROLLER0_IP}, port_value: 6443 }
        - endpoint:
            address:
              socket_address: { address: ${CONTROLLER1_IP}, port_value: 6443 }
        - endpoint:
            address:
              socket_address: { address: ${CONTROLLER2_IP}, port_value: 6443 } 
-- Mark Vtorushin
envoyproxy
json
kubernetes

1 Answer

7/7/2021

This topic is covered by the official Envoy FAQ section:

All bootstrap files are expected to be v3.

For dynamic configuration, we have introduced two new fields to config sources, transport API version and resource API version. The distinction is as follows:

  • The transport API version indicates the API endpoint and version of DiscoveryRequest/DiscoveryResponse messages used.

  • The resource API version indicates whether a v2 or v3 resource, e.g. v2 RouteConfiguration or v3 RouteConfiguration, is delivered.

The API version must be set for both transport and resource API versions.

If you see a warning or error with V2 (and AUTO) xDS transport protocol versions are deprecated, it is likely that you are missing explicit V3 configuration of the transport API version.


Also, you can still use v2 by:

  • Setting –bootstrap-version 2 on the CLI for a v2 bootstrap file.

  • Enabling the runtime envoy.reloadable_features.enable_deprecated_v2_api feature. This is implicitly enabled if a v2 –bootstrap-version is set.

-- Wytrzymały Wiktor
Source: StackOverflow