Skip to content

Commit

Permalink
Add a single worker Kind config and deployment method (#354)
Browse files Browse the repository at this point in the history
* Add a single worker Kind config and deployment method

* Free disk space update
  • Loading branch information
sebrandon1 authored Sep 29, 2023
1 parent fac296f commit 2d660d2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ rebuild-cluster: delete-cluster
./scripts/delete-standard-storageclass.sh
./scripts/remove-control-plane-taint.sh

# Creates a k8s cluster with a single worker
rebuild-cluster-single-worker: delete-cluster
./scripts/deploy-k8s-cluster-single-worker.sh
./scripts/deploy-calico.sh
./scripts/preload-images.sh
./scripts/delete-standard-storageclass.sh
./scripts/remove-control-plane-taint.sh

delete-cluster:
./scripts/delete-k8s-cluster.sh

Expand Down
12 changes: 12 additions & 0 deletions config/k8s-cluster/single-worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
ipFamily: dual
disableDefaultCNI: true
apiServerAddress: "0.0.0.0"
apiServerPort: 6443
nodes:
- role: control-plane
image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- role: worker
image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
5 changes: 5 additions & 0 deletions scripts/deploy-k8s-cluster-single-worker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -x

# Kind base with kindnetcni and ipv4/ipv6
kind create cluster --config=config/k8s-cluster/single-worker.yaml

0 comments on commit 2d660d2

Please sign in to comment.