简体   繁体   English

envoy 容器无法启动

[英]envoy container fails to start

envoy container failing while startup with the below error特使容器在启动时失败并出现以下错误

Configuration does not parse cleanly as v3. v2 configuration is deprecated and will be removed from Envoy at the start of Q1 2021: Unknown field in: {"static_resources":{"listeners":[{"address":{"socket_address":{"address":"0.0.0.0","port_value":443}},"filter_chains":[{"tls_context":{"common_tls_context":{"tls_certificates":[{"private_key":{"filename":"/etc/ssl/private.key"},"certificate_chain":{"filename":"/etc/ssl/keychain.crt"}}]}},"filters":[{"typed_config":{"route_config":{"name":"local_route","virtual_hosts":[{"domains":["*"],"routes":[{"match":{"prefix":"/"},"route":{"host_rewrite_literal":"127.0.0.1","cluster":"service_envoyproxy_io"}}],"name":"local_service"}]},"@type":"type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager","http_filters":[{"name":"envoy.filters.http.router"}],"access_log":[{"typed_config":{"@type":"type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog","path":"/dev/stdout"},"name":"envoy.access_loggers.file"}],"stat_prefix":"ingress_http"},"name":"envoy.filters.network.http_connection_manager"}]}],"name":"listener_0"}],"clusters":[{"load_assignment":{"cluster_name":"service_envoyproxy_io","endpoints":[{"lb_endpoints":[{"endpoint":{"address":{"socket_address":{"port_value":8080,"address":"127.0.0.1"}}}}]}]},"connect_timeout":"30s","name":"service_envoyproxy_io","dns_lookup_family":"V4_ONLY","transport_socket":{"name":"envoy.transport_sockets.tls","typed_config":{"@type":"type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext","sni":"www.envoyproxy.io"}},"type":"LOGICAL_DNS"}]}}

Here's my envoy.yaml file这是我的特使。yaml 文件

static_resources:

  listeners:
  - name: listener_0
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 443
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          stat_prefix: ingress_http
          access_log:
          - name: envoy.access_loggers.file
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
              path: /dev/stdout
          http_filters:
          - name: envoy.filters.http.router
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              routes:
              - match:
                  prefix: "/"
                route:
                  host_rewrite_literal: 127.0.0.1
                  cluster: service_envoyproxy_io
      tls_context:
        common_tls_context:
          tls_certificates:
            - certificate_chain:
                filename: "/etc/ssl/keychain.crt"
              private_key:
                filename: "/etc/ssl/private.key"

  clusters:
  - name: service_envoyproxy_io
    connect_timeout: 30s
    type: LOGICAL_DNS
    # Comment out the following line to test on v6 networks
    dns_lookup_family: V4_ONLY
    load_assignment:
      cluster_name: service_envoyproxy_io
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: 127.0.0.1
                port_value: 8080
    transport_socket:
      name: envoy.transport_sockets.tls
      typed_config:
        "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
        sni: www.envoyproxy.io

I'm I doing something wrong here?我在这里做错了吗?

The error message states that: Configuration does not parse cleanly as v3. v2 configuration is deprecated and will be removed from Envoy at the start of Q1 2021错误消息指出: Configuration does not parse cleanly as v3. v2 configuration is deprecated and will be removed from Envoy at the start of Q1 2021 Configuration does not parse cleanly as v3. v2 configuration is deprecated and will be removed from Envoy at the start of Q1 2021 . Configuration does not parse cleanly as v3. v2 configuration is deprecated and will be removed from Envoy at the start of Q1 2021 The v2 xDS APIs are deprecated and will be removed form Envoy in Q1 2021, as per the API versioning policy .根据API 版本控制政策,v2 xDS API 已弃用,并将在 2021 年第一季度从 Envoy 中删除。

According to the official docs you got the following options:根据官方文档,您有以下选项:

  1. In the interim, you can continue to use the v2 API for the transitional period by:在此期间,您可以通过以下方式在过渡期内继续使用 v2 API:
  • Setting --bootstrap-version 2 on the CLI for a v2 bootstrap file.在 CLI 上为 v2 引导文件设置--bootstrap-version 2。

  • Enabling the runtime envoy.reloadable_features.enable_deprecated_v2_api feature.启用运行时envoy.reloadable_features.enable_deprecated_v2_api功能。 This is implicitly enabled if a v2 --bootstrap-version is set.如果设置了 v2 --bootstrap-version ,则会隐式启用此功能。

  1. Or Configure Envoy to use the v3 API配置 Envoy 以使用 v3 API

More details can be found in the linked docs.可以在链接的文档中找到更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM