k3d-go
k3s in docker
k3s is the lightweight Kubernetes distribution by Rancher: rancher/k3s This repository is basically zeerorg/k3s-in-docker reimplemented in Golang... just because I didn't have time to learn Rust. Also I've added some functionality.
Requirements
- docker
Install
Grab a release from the release tab.
or...
Build
- Clone this repo, e.g. via
go get -u github.com/iwilltry42/k3d-go/releases - Inside the repo run
make bootstrapto install build tools and thenmake buildto build for your current systemgo installto install it to yourGOPATHmake build-crossto build for all systems
Usage
Check out what you can do via k3d help
Example Workflow: Create a new cluster and use it with kubectl
k3d createto create a new single-node cluster (docker container)export KUBECONFIG=$(k3d get-kubeconfig)to makekubectlto use the kubeconfig for that cluster- execute some commands like
kubectl get pods --all-namespaces k3d deleteto delete the default cluster
Languages
Go
89.6%
Shell
8.3%
Makefile
1.7%
Dockerfile
0.4%