-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·35 lines (30 loc) · 1019 Bytes
/
install.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
#!/usr/bin/env bash
if ! which kind > /dev/null 2>&1; then
echo "install kind ..."
curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.20.0/kind-$(uname)-amd64"
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
fi
if ! which kubectl > /dev/null 2>&1; then
echo "install kubectl ..."
curl -LO "https://dl.k8s.io/release/v1.27.3/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
fi
if ! which flux > /dev/null 2>&1; then
# https://fluxcd.io/flux/installation/#install-the-flux-cli
echo "install flux cli"
curl -s https://fluxcd.io/install.sh | sudo bash
fi
# https://kind.sigs.k8s.io/docs/user/configuration/
echo "create kind cluster"
kind create cluster --name private-cloud --config kind-conf/kind-config.yaml
# https://fluxcd.io/flux/get-started/
echo "install flux"
flux bootstrap github \
--owner="$GITHUB_USER" \
--repository=private-cloud \
--branch=main \
--path=./clusters/private-cloud \
--personal \
--private false