<p>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:</p>
<pre><code>&quot;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 &quot;
</code></pre>
<p>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.</p>
<pre><code>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 } 
</code></pre>

<p>This topic is covered by the <a href="https://www.envoyproxy.io/docs/envoy/latest/faq/api/envoy_v3#how-do-i-configure-envoy-to-use-the-v3-api" rel="nofollow noreferrer">official Envoy FAQ section</a>:</p>
<blockquote>
<p>All bootstrap files are expected to be v3.</p>
<p>For dynamic configuration, we have introduced two new fields to
<a href="https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/config_source.proto#envoy-v3-api-msg-config-core-v3-configsource" rel="nofollow noreferrer">config sources</a>, transport API version and resource API version.
The distinction is as follows:</p>
<ul>
<li><p>The <a href="https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/config_source.proto#envoy-v3-api-field-config-core-v3-apiconfigsource-transport-api-version" rel="nofollow noreferrer">transport API</a> version indicates the API endpoint and version of <code>DiscoveryRequest</code>/<code>DiscoveryResponse</code> messages used.</p>
</li>
<li><p>The <a href="https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/config_source.proto#envoy-v3-api-field-config-core-v3-configsource-resource-api-version" rel="nofollow noreferrer">resource API</a> version indicates whether a v2 or v3 resource, e.g. v2 <code>RouteConfiguration</code> or v3 <code>RouteConfiguration</code>, is delivered.</p>
</li>
</ul>
<p>The API version must be set for both transport and resource API
versions.</p>
<p>If you see a warning or error with <code>V2 (and AUTO) xDS transport protocol versions are deprecated</code>, it is likely that you are missing
explicit V3 configuration of the transport API version.</p>
</blockquote>
<ul>
<li><p>Check out <a href="https://pjausovec.medium.com/the-v2-xds-major-version-is-deprecated-and-disabled-by-default-envoy-60672b1968cb" rel="nofollow noreferrer">this source</a> for an example.</p>
</li>
<li><p>There is <a href="https://www.getenvoy.io/" rel="nofollow noreferrer">this open source tool</a> that makes it easy to install and upgrade Envoy.</p>
</li>
</ul>
<hr />
<p>Also, you can still use v2 by:</p>
<ul>
<li><p>Setting <a href="https://www.envoyproxy.io/docs/envoy/v1.17.0/operations/cli#cmdoption-bootstrap-version" rel="nofollow noreferrer">–bootstrap-version</a> 2 on the CLI for a v2 bootstrap file.</p>
</li>
<li><p>Enabling the runtime <code>envoy.reloadable_features.enable_deprecated_v2_api</code> feature. This is implicitly enabled if a v2 <a href="https://www.envoyproxy.io/docs/envoy/v1.17.0/operations/cli#cmdoption-bootstrap-version" rel="nofollow noreferrer">–bootstrap-version</a> is set.</p>
</li>
</ul>
