I am having an issue where I can’t get nodes to join the raft when setting the -tls-server-name flag.
We are trying to use a wildcard cert form lets encrypt.
I have tried setting leader_tls_servername in
env vars with extraEnvironmentVars:
in the values.yaml
in the retry_join stanza
and at the command line
I receive failures as if the flag wasn’t set.
vault operator raft join \
-tls-server-name=*.mgmt-vault.example.com \
https://vault-0.vault-internal:8200
core: failed to get raft challenge: leader_addr=
https://vault-0.vault-internal:8200
error="error during raft bootstrap init call: Put \"
https://vault-0.vault-internal:8200/v1/sys/storage/raft/bootstrap/challenge\":
x509: certificate is valid for *.mgmt-vault.example.com, not vault-0.vault-internal"
Our helm values file is here.
Thank for your time
# Vault Helm Chart Value Overrides
global:
enabled: true
tlsDisable: false
injector:
enabled: true
server:
image:
repository: "hashicorp/vault"
tag: "latest"
readinessProbe:
enabled: true
port: 8200
failureThreshold: 2
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
livenessProbe:
enabled: false
path: "/v1/sys/health?standbyok=true"
port: 8200
failureThreshold: 2
initialDelaySeconds: 60
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 3
extraEnvironmentVars:
VAULT_TLS_SERVER_NAME: "*.mgmt-vault.example.com"
VAULT_ADDR: "https://localhost:8200"
volumes:
- name: userconfig-mgmt-vault-tls
secret:
defaultMode: 420
secretName: mgmt-vault-tls
volumeMounts:
- mountPath: /vault/userconfig/mgmt-vault-tls
name: userconfig-mgmt-vault-tls
readOnly: true
auditStorage:
enabled: false
certs:
secretName: mgmt-vault-tls
standalone:
enabled: false
service:
enabled: true
active:
enabled: true
standby:
enabled: true
instanceSelector:
enabled: true
publishNotReadyAddresses: true
externalTrafficPolicy: Local
port: 8200
targetPort: 8200
annotations: {}
ha:
enabled: true
replicas: 3
raft:
enabled: true
setNodeId: true
config: |
ui = true
seal "awskms" {
region = "us-east-1"
kms_key_id = "alias/vault-kms-unseal-hive-mgmt"
}
listener "tcp" {
address = "0.0.0.0:8200"
cluster_address = "0.0.0.0:8201"
tls_cert_file = "/vault/userconfig/mgmt-vault-tls/tls.crt"
tls_key_file = "/vault/userconfig/mgmt-vault-tls/tls.key"
}
storage "raft" {
path = "/vault/data"
retry_join {
address = "https://localhost:8200"
leader_tls_servername = "*.mgmt-vault.example.com"
leader_api_addr = "https://vault-0.vault-internal:8200"
}
retry_join {
address = "https://localhost:8200"
leader_tls_servername = "*.mgmt-vault.example.com"
leader_api_addr = "https://vault-1.vault-internal:8200"
}
retry_join {
address = "https://localhost:8200"
leader_tls_servername = "*.mgmt-vault.example.com"
leader_api_addr = "https://vault-2.vault-internal:8200"
}
}
disable_mlock = true
service_registration "kubernetes" {}
serviceAccount:
create: false
name: "vault-kms-iam-role"
serviceDiscovery:
enabled: true
# Vault UI
ui:
enabled: true
serviceType: "LoadBalancer"
serviceNodePort: null
externalPort: 8200
externalTrafficPolicy: Local
activeVaultPodOnly: true
# For Added Security, edit the below
#loadBalancerSourceRanges:
# - < Your IP RANGE Ex. 10.0.0.0/16 >
# - < YOUR SINGLE IP Ex. 1.78.23.3/32 >