Skip to content

Commit

Permalink
test: Create multi node kind cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
SaaldjorMike committed Sep 16, 2024
1 parent daac589 commit a4acdda
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 1 addition & 2 deletions hack/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PATH=$bin_dir/goinstall/bin:$bin_dir:/usr/local/go/bin:$PATH
GOBIN=$bin_dir

start_kind_cluster() {
$kind create cluster --name kind --image $kindest_node_image_multiplatform_amd64_arm64 --wait 300s
$kind create cluster --name kind --config hack/kind-config.yaml --image $kindest_node_image_multiplatform_amd64_arm64 --wait 300s

sleep 5

Expand All @@ -25,7 +25,6 @@ start_kind_cluster() {
exit 1
fi

$kubectl label node --overwrite --all topology.kubernetes.io/zone=az1
$kubectl patch clusterrolebinding cluster-admin --type='json' -p='[{"op": "add", "path": "/subjects/1", "value": {"kind": "ServiceAccount", "name": "default", "namespace": "default" } }]'
}

Expand Down
13 changes: 13 additions & 0 deletions hack/kind-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
labels:
"topology.kubernetes.io/zone": "us-west-2a"
- role: worker
labels:
"topology.kubernetes.io/zone": "us-west-2b"
- role: worker
labels:
"topology.kubernetes.io/zone": "us-west-2c"

0 comments on commit a4acdda

Please sign in to comment.