当尝试从我的 configMap 文件中的 env 变量中导出一个值 (CONSUL_DNS_SERVICE_HOST) 时,我收到一个错误 - PSB
# From my container:
> printenv CONSUL_DNS_SERVICE_HOST
10.100.180.151
> kubectl -n kube-system get configmap coredns -o yaml
apiVersion: v1
data:
Corefile: |
.:53 {
errors
log
health
kubernetes cluster.local 10.0.0.0/24
rewrite name . .default.svc.cluster.local
prometheus :9153
proxy . /etc/resolv.conf
cache 30
reload
}
consul:53 {
log
errors
cache 30
proxy . "$(printenv CONSUL_DNS_SERVICE_HOST)"
> kubectl logs --tail=20 -f coredns-7bcbfc4774-4n9p7 -n kube-system
2019/01/10 11:15:59 plugin/proxy: not an IP address or file: "$(printenv CONSUL_DNS_SERVICE_HOST)"
我找不到办法检索 CONSUL_DNS_SERVICE_HOST 的 IP
谢谢