Interview Prep/DevSecOps/Secrets management: Vault, External Secrets and SOPS

Vault writes fail with `local node not active but active cluster node not found`; `vault operator raft list-peers` shows 2 of 5 voters

AdvancedTroubleshootingSecrets management: Vault, External Secrets and SOPS
Answer

Likely causes → Raft lost quorum. 3 of 5 nodes are gone (a zone outage, or PVCs deleted during a node pool replacement), so no leader can be elected.

Diagnose →

kubectl get pods,pvc -n vault
kubectl logs -n vault vault-0 | grep -i -E "raft|election"

Fix → If the lost nodes can come back with their data, bring them back. If not, do manual recovery: stop the remaining nodes, write raft/peers.json on a surviving node listing only the healthy peers, start it, unseal it, and re-join the others with vault operator raft join. As a last resort, restore from a vault operator raft snapshot save backup.

Prevent → Spread voters across 3 zones, use PodDisruptionBudget and pod anti-affinity, enable Autopilot (vault operator raft autopilot set-config -cleanup-dead-servers=true), and take scheduled snapshots.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Secrets management: Vault, External Secrets and SOPS