From b1e1703572d0d2251d82ff644323dd80e59b6be4 Mon Sep 17 00:00:00 2001 From: ss75710541 <75710541@qq.com> Date: Fri, 17 Dec 2021 17:06:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4ntp=5Fserver=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BAntp.aliyun.com=EF=BC=8C=20coredns=20forward?= =?UTF-8?q?=20=E6=94=B9=E4=B8=BA=20=E4=BB=8E=E5=8F=98=E9=87=8Fupstream=5Fd?= =?UTF-8?q?ns=5Fips=20=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.cfg.example | 2 +- roles/k8s-masters/templates/coredns-config.yml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.cfg.example b/config.cfg.example index 129d9d1..ebf3999 100644 --- a/config.cfg.example +++ b/config.cfg.example @@ -16,7 +16,7 @@ upstream_dns_ips="10.8.255.1 10.8.255.2 114.114.114.114" # 是否安装时间同步服务(chronyd),True表示安装,False表示不安装,默认True,只有已经安装了 ntp 时间同步服务的情况下不安装; chronyd_install="True" # chronyd_install=True 时才生效,定义外部 ntp_server, ntp.cloud.aliyuncs.com 为阿里云内部 ntp 同步 server, 非阿里云主机访问可以改为 ntp.aliyun.com, 或自定义的 ntp server -ntp_server="ntp.cloud.aliyuncs.com" +ntp_server="ntp.aliyun.com" export LOCAL_IP=`ip a show $LOCAL_ENNAME|awk '/inet.*brd.*'$LOCAL_ENNAME'/{print $2}'|awk -F "/" '{print $1}'` # 无需改动 if [ -z "$LOCAL_IP" ];then diff --git a/roles/k8s-masters/templates/coredns-config.yml.j2 b/roles/k8s-masters/templates/coredns-config.yml.j2 index 26cd215..b630a73 100644 --- a/roles/k8s-masters/templates/coredns-config.yml.j2 +++ b/roles/k8s-masters/templates/coredns-config.yml.j2 @@ -13,7 +13,7 @@ data: ttl 30 } prometheus :9153 - forward . {{master_vip}}:53 { + forward . {{upstream_dns_ips}} { max_concurrent 1000 } cache 30