-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsec_kind.sh
84 lines (55 loc) · 1.68 KB
/
sec_kind.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/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
featureGates:
PodSecurity: true
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
seccomp-default: "true"
feature-gates: "SeccompDefault=true"
- role: worker
kubeadmConfigPatches:
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
seccomp-default: "true"
feature-gates: "SeccompDefault=true"
- role: worker
kubeadmConfigPatches:
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
seccomp-default: "true"
feature-gates: "SeccompDefault=true"
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)
secret=$(cat vault.hclic)
kubectl create secret generic vault-ent-license --from-literal="license=${secret}"
helm install hashicorp hashicorp/vault --create-namespace --set='ui.enabled=true' --set='ui.serviceType=NodePort' --set 'server.dev.enabled=true' -f config.yaml
sleep 30