Hi, we try to install consul helm using external servers
this is the values.yaml
:
fullnameOverride: consul
global:
enabled: false
image: "hashicorp/consul:1.13.1"
imageK8S: hashicorp/consul-k8s-control-plane:0.48.0
datacenter: "${CONSUL_DATACENTER}"
externalServers:
enabled: true
hosts:
- "${CONSUL_HTTP_ADDR}"
k8sAuthMethodHost: "${EKS_CLUSTER_ENDPOINT}"
client:
enabled: true
exposeGossipPorts: true
join:
- "${CONSUL_HTTP_ADDR}"
tolerations: |
- operator: "Exists"
extraVolumes:
- load: false
name: vault-cli-tls-bundle
type: secret
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
the placeholder will be replaced with actual values.
we got this error :
consul-client-4w4dh client-acl-init 2022-09-27T22:50:57.776Z [ERROR] unable to login: error="Post "https://consul-server.internal.example.com:8501:8501/v1/acl/login": dial tcp: lookup consul-server.internal.example.com:8501: no such host"
try to exec to the pod :
❯ k -n consul exec -it consul-client-5fpwc -c client-acl-init -- sh
/ $ cat /etc/resolv.conf
search consul.svc.cluster.local svc.cluster.local cluster.local us-west-2.compute.internal
nameserver 172.20.0.10
options ndots:5
/ $ nslookup nslookup consul-server.internal.example.com
;; connection timed out; no servers could be reached
/ $ nslookup nslookup consul-server.internal.example.com
command terminated with exit code 137
but trying another pod its success
❯ k -n vault exec -it vault-agent-injector-6d64d4f784-xmwbn -- sh
/ $ nslookup consul-server.internal.example.com
Server: 172.20.0.10
Address: 172.20.0.10:53
Non-authoritative answer:
Non-authoritative answer:
Name: consul-server.internal.example.com
Address: 10.11.4.74
Name: consul-server.internal.example.com
Address: 10.11.46.184
Name: consul-server.internal.example.com
Address: 10.11.21.77