简体   繁体   English

如何使用自定义config.yaml在K8s上部署Consul客户端?

[英]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.extraConfigclient.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.

相关问题 Snakefile 的 config.yaml 中的相对路径 - Relative paths in config.yaml for Snakefile 如何在 k8s yaml 文件中获取 name 选项的文本值 - how get text value of name option in k8s yaml file 如何使用 Fabric8 k8s java 客户端(版本:6.0.0)删除 HorizontalPodAutoscaler - How to delete HorizontalPodAutoscaler using Fabric8 k8s java client (version: 6.0.0) golang k8s 客户端中的 Pod 重新部署触发器 - Pod redeploy trigger in golang k8s client 无法确定默认配置路径。 在 cloudflared Linux 中没有文件 [config.yml config.yaml] - Cannot determine default configuration path. No file [config.yml config.yaml] in cloudflared Linux 在 minikube 中更新 k8s - update k8s in minikube 根据config.yaml文件的新版本,在linux环境中Iotedge的非活动状态 - Inactive state of Iotedge on linux environment according to new release of config.yaml file 出现错误:运行 cloudtracker --account demo --list users 时无法从配置文件 config.yaml 加载 yaml - Getting ERROR :Could not load yaml from config file config.yaml while runing cloudtracker --account demo --list users 何时在 K8s 中使用外部 LoadBalancer? - When to use external LoadBalancer in K8s? 启动k8s Dashboard报错CrushLoopBackOff - Error CrushLoopBackOff to start k8s Dashboard
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM