Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
170 views
in Technique[技术] by (71.8m points)

How to connect vault CLI to Vault Cluster installed on k8s?

I have installed the vault cluster in k8s (AKS), now i try to connect to that cluster with vault CLI
the problem is i can't find any info or documentation .
i downloaded the vault.exe, but where do I configure it to connect to the cluster?

question from:https://stackoverflow.com/questions/65869973/how-to-connect-vault-cli-to-vault-cluster-installed-on-k8s

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You need to export some env to use the vault CLI:

// Your vault server address
$ export VAULT_ADDR=https://127.0.0.1:8200

// vault token
$ export VAULT_TOKEN= "****"

// If your server is secured with TLS
$ export VAULT_CACERT=ca.crt 
$ export VAULT_CLIENT_CERT=tls.crt
$ export VAULT_CLIENT_KEY=tls.key 

Now, you ready to use the vault CLI.

$ vault status
Key             Value
---             -----
Seal Type       shamir
Initialized     true
Sealed          false
... ... ... 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...