簡體   English   中英

envoy 容器無法啟動

[英]envoy container fails to start

特使容器在啟動時失敗並出現以下錯誤

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"}]}}

這是我的特使。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

我在這里做錯了嗎?

錯誤消息指出: 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 根據API 版本控制政策,v2 xDS API 已棄用,並將在 2021 年第一季度從 Envoy 中刪除。

根據官方文檔,您有以下選項:

  1. 在此期間,您可以通過以下方式在過渡期內繼續使用 v2 API:
  • 在 CLI 上為 v2 引導文件設置--bootstrap-version 2。

  • 啟用運行時envoy.reloadable_features.enable_deprecated_v2_api功能。 如果設置了 v2 --bootstrap-version ,則會隱式啟用此功能。

  1. 配置 Envoy 以使用 v3 API

可以在鏈接的文檔中找到更多詳細信息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM