-
Notifications
You must be signed in to change notification settings - Fork 1
/
vault.sh
49 lines (29 loc) · 1.08 KB
/
vault.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
#
#
#
set -oe errexit
# desired cluster name; default is "kind"
KIND_CLUSTER_NAME="vault"
echo "> initializing Kind cluster: ${KIND_CLUSTER_NAME}"
# create a cluster
cat <<EOF | KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster --image kindest/node:v1.23.13 --name "${KIND_CLUSTER_NAME}" --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
EOF
echo " ✓ helm repo add hashicorp https://helm.releases.hashicorp.com 📦 "
##helm
helm repo add hashicorp https://helm.releases.hashicorp.com
echo "> 😊😊 Verify Cluster install"
sleep 30
echo "> 😊😊 Verify Cluster install...."
sleep 30
echo "> 😊😊 Verify Cluster install...."
sleep 30
kubectl wait --for=condition=Ready=true node/vault-control-plane --timeout=30s
secret=$(cat vault.hclic)
kubectl create secret generic vault-ent-license --from-literal="license=${secret}" -n vault
helm install hashicorp hashicorp/vault --create-namespace --namespace vault --set='ui.enabled=true' --set='ui.serviceType=NodePort' --set 'server.dev.enabled=true' -f config.yaml
sleep 30