Skip to content

Commit

Permalink
Add Powershell scripts to run Kubernetes Goat in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
samriggs committed Feb 1, 2025
1 parent 6ba2243 commit b45a05a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
28 changes: 28 additions & 0 deletions platforms/kind-setup/setup-kind-cluster-and-goat.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file has been created to contribute to the development of the Kubernetes Goat

# Check that kind is installed
try {
kind version | Out-Null
Write-Output "Kind is installed, all good"
} catch {
Write-Output "Please install Kind to use this setup file"
exit
}

# Check that docker is installed in the host
try {
docker version --format '{{.Server.Version}}' | Out-Null
Write-Output "Docker is installed, all good"
} catch {
Write-Output "Please install Docker to use this setup file"
exit
}

# Setup cluster using extraMounts to expose the docker socket from the host
kind create cluster --config kind-cluster-setup.yaml --name kubernetes-goat-cluster

# Move to the root dir
cd ../..

# Setup GOAT exposing host Docker socket:
.\setup-kubernetes-goat.ps1
5 changes: 5 additions & 0 deletions platforms/kind-setup/teardown-cluster.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file has been created to contribute to the development of the Kubernetes Goat

# Destroy cluster and delete everyting
../../teardown-kubernetes-goat.ps1
kind delete cluster --name kubernetes-goat-cluster

0 comments on commit b45a05a

Please sign in to comment.