File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
+ KIND_CLUSTER_NAME=" backstage"
2
3
3
4
# Setup a Kubernetes cluster with kind
4
- kind create cluster --image kindest/node:v1.26.6 --wait 5m --name backstage --config ./scripts/kind-cluster-config.yaml
5
+ if [[ " $( kind get clusters) " = $KIND_CLUSTER_NAME ]]; then
6
+ echo " Kind cluster $KIND_CLUSTER_NAME already exists."
7
+ else
8
+ echo " Creating kind cluster $KIND_CLUSTER_NAME "
9
+ kind create cluster --image kindest/node:v1.26.6 --wait 5m --name backstage --config ./scripts/kind-cluster-config.yaml
10
+ fi
11
+
12
+ # Check whether cluster context is configured or not
13
+ # if [[ "$(kubectl config get-contexts | grep kind-backstage | awk {'print $2'})" = "kind-$KIND_CLUSTER_NAME" ]]; then
14
+ # echo "Cluster context already configured."
15
+ # else
16
+ # mkdir -p $Home/.kube
17
+ # sudo kind get kubeconfig -n backstage >> $HOME/.kube/config
18
+ # fi
You can’t perform that action at this time.
0 commit comments