[英]How to deploy the Consul client on K8s with custom config.yaml?
I am trying to deploy the Consul client on a k8s cluster ( the Consul server is on a docker swarm cluster).我正在尝试在 k8s 集群上部署 Consul 客户端(Consul 服务器位于 docker swarm 集群上)。 I want to use a config.yaml (mentioned in https://www.consul.io/docs/k8s/installation/deployment-configurations/servers-outside-kube.netes ) to set up the configuration.我想使用 config.yaml(在https://www.consul.io/docs/k8s/installation/deployment-configurations/servers-outside-kube.netes中提到)来设置配置。 I found a Helm Chart Configuration page ( https://www.consul.io/docs/k8s/helm#client ) and a Configuration page ( https://www.consul.io/docs/agent/options#config_key_reference ).我找到了一个 Helm Chart 配置页面 ( https://www.consul.io/docs/k8s/helm#client ) 和一个配置页面 ( https://www.consul.io/docs/agent/options#config_key_reference )。 What is the difference between them?它们之间有什么区别? It seems that I need to refer to the Helm Chart Configuration page since I am working on the k8s.由于我在 k8s 上工作,因此似乎我需要参考 Helm Chart Configuration 页面。 However, on the Helm Chart Configuration page, I can not find how to set up something like node_name, data_dir, client_addr, bind_addr, advertise_addr.但是,在 Helm Chart Configuration 页面上,我找不到如何设置诸如 node_name、data_dir、client_addr、bind_addr、advertise_addr 之类的内容。 Besides, I also need to set verify_incoming, encrypt, verify_outgoing, verify_server_hostname.此外,我还需要设置verify_incoming、encrypt、verify_outgoing、verify_server_hostname。 For ca_file, cert_file, and key_file, I assume that cert_file is for caCert (in Helm Chart Configuration), key_file is for caKey, and I am not sure what the ca_file stand for.对于 ca_file、cert_file 和 key_file,我假设 cert_file 用于 caCert(在 Helm Chart 配置中),key_file 用于 caKey,我不确定 ca_file 代表什么。
k8s version: Server Version:v1.22.4 There ate four servers in the cluster. k8s version: Server Version:v1.22.4 集群中吃了四台服务器。
Any help would be appreciated.任何帮助,将不胜感激。 Thanks谢谢
I can not find how to set up something like node_name, data_dir, client_addr, bind_addr, advertise_addr.我找不到如何设置诸如 node_name、data_dir、client_addr、bind_addr、advertise_addr 之类的内容。 Besides, I also need to set verify_incoming, encrypt, verify_outgoing, verify_server_hostname.此外,我还需要设置verify_incoming、encrypt、verify_outgoing、verify_server_hostname。 For ca_file, cert_file, and key_file, I assume that cert_file is for caCert对于 ca_file、cert_file 和 key_file,我假设 cert_file 用于 caCert
Most of these parameters are specified by the Helm chart when deploying the Consul client or server pods.这些参数中的大多数在部署 Consul 客户端或服务器 pod 时由 Helm chart 指定。 Is there a particular reason that you need to override these particular settings?您是否有特殊原因需要覆盖这些特定设置?
With that said, you can use server.extraConfig
and client.extraConfig
to provide additional configuration parameters to the server and client agents.话虽如此,您可以使用server.extraConfig
和client.extraConfig
为服务器和客户端代理提供额外的配置参数。 Normally you would only specify parameters that are not already specified by deployments created by the Helm chart.通常,您只会指定 Helm 图表创建的部署尚未指定的参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.