-
-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Powershell scripts to run Kubernetes Goat in Windows
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |