I ran this command to check the vault logs in real time;
kubectl logs -f vault-vault-0 -n vault -c vault
and I found that:
Vault nodes cannot resolve the DNS names of other Vault nodes in the HA cluster.
and this issue prevent vault to upgrading properly.
Summary:
The inability of the Vault nodes to find each other via DNS is a fundamental barrier to a successful HA Vault deployment and upgrade. The upgrade process relies on the nodes coordinating, electing a leader, and synchronizing data – all of which are impossible without proper network communication and DNS resolution.
logs output:
y":1,"term":10,"votesNeeded":2} {"@level":"warn","@message":"Election timeout reached, restarting election","@module":"storage.raft","@timestamp":"2025-03-05T12:09:42.145931Z"} {"@level":"info","@message":"entering candidate state","@module":"storage.raft","@timestamp":"2025-03-05T12:09:42.145972Z","node":{},"term":10} {"@level":"error","@message":"failed to make requestVote RPC","@module":"storage.raft","@timestamp":"2025-03-05T12:09:42.150886Z","error":"dial tcp: lookup vault-vault-1.vault-vault-internal on 10.100.0.10:53: no such host","target":{"Suffrage":0,"ID":"vault-vault-1","Address":"vault-vault-1.vault-vault-internal:8201"},"term":10} {"@level":"error","@message":"failed to make requestVote RPC","@module":"storage.raft","@timestamp":"2025-03-05T12:09:42.151569Z","error":"dial tcp: lookup vault-vault-2.vault-vault-internal on 10.100.0.10:53: no such host","target":{"Suffrage":0,"ID":"vault-vault-2","Address":"vault-vault-2.vault-vault-internal:8201"},"term":10} {"@level":"info","@message":"pre-vote campaign failed, waiting for election timeout","@module":"storage.raft","@timestamp":"2025-03-05T12:09:42.151624Z","refused":2,"tally":1,"term":10,"votesNeeded":2} {"@level":"warn","@message":"Election timeout reached, restarting election","@module":"storage.raft","@timestamp":"2025-03-05T12:09:50.630596Z"} {"@level":"info","@message":"entering candidate state","@module":"storage.raft","@timestamp":"2025-03-05T12:09:50.630631Z","node":{},"term":10} {"@level":"error","@message":"failed to make requestVote RPC","@module":"storage.raft","@timestamp":"2025-03-05T12:09:50.634650Z","error":"dial tcp: lookup vault-vault-2.vault-vault-internal on 10.100.0.10:53: no such host","target":{"Suffrage":0,"ID":"vault-vault-2","Address":"vault-vault-2.vault-vault-internal:8201"},"term":10} {"@level":"error","@message":"failed to make requestVote RPC","@module":"storage.raft","@timestamp":"2025-03-05T12:09:50.635530Z","error":"dial tcp: lookup vault-vault-1.vault-vault-internal on 10.100.0.10:53: no such host","target":{"Suffrage":0,"ID":"vault-vault-1","Address":"vault-vault-1.vault-vault-internal:8201"},"term":10} {"@level":"info","@message":"pre-vote campaign failed, waiting for election timeout","@module":"storage.raft","@timestamp":"2025-03-05T12:09:50.635576Z","refused":2,"tally":1,"term":10,"votesNeeded":2}.