vault HA模式部署
前提:helm 部署的vault
1,根据实际条件修改pvc大小,指定sc等
2,修改模式 ,standalone改为false,ha改为true,raft.enabled 改为true
3,修改config段配置
点击查看代码
config:|
ui = true
***
storage "raft" {
path = "/vault/data"
retry_join {
leader_api_addr = "http://vault-0.vault-internal:8200"
}
retry_join {
leader_api_addr = "http://vault-1.vault-internal:8200"
}
retry_join {
leader_api_addr = "http://vault-2.vault-internal:8200"
}
}
4,初始化任意一个节点,注意!!!只初始化一个节点!!!
5,三个副本都需要解封,注意!!!用步骤4 生成的key!!!
6,查看集群状态
- vault login
- vault operator raft list-peers
- Node Address State Voter
a1799962-8711-7f28-23f0-cea05c8a527d vault-0.vault-internal:8201 leader true
e6876c97-aaaa-a92e-b99a-0aafab105745 vault-1.vault-internal:8201 follower true
4b5d7383-ff31-44df-e008-6a606828823b vault-2.vault-internal:8201 follower true
- Node Address State Voter