k8s动态配置/etc/hosts
k8s动态配置/etc/hosts###使用命令行修改hosts,完事后保存退出,立即生效kubectledit configmapcoredns-nkube-system# Please edit the object below. Lines beginning with a '#' will be ignored,# and an empty file will abort the edit
·
k8s动态配置/etc/hosts
###使用命令行修改hosts,完事后保存退出,立即生效
kubectl edit configmap coredns -n kube-system
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
data:
Corefile: |
.:53 {
errors
health
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
upstream
fallthrough in-addr.arpa ip6.arpa
}
hosts {
192.168.4.203 master.seq01
fallthrough
}
prometheus :9153
forward . /etc/resolv.conf
cache 30
loop
reload
loadbalance
}
kind: ConfigMap
metadata:
creationTimestamp: "2020-11-02T08:07:24Z"
name: coredns
namespace: kube-system
resourceVersion: "387829"
selfLink: /api/v1/namespaces/kube-system/configmaps/coredns
uid: 70d8c28a-1ce2-11eb-a27e-bc97e155d4ce
更多推荐
已为社区贡献2条内容
所有评论(0)