Lightweight wrapper to manage Kubernetes clusters
- Ease of creating and maintaining local clusters with different engines (kind, k3d and minikube)
- Addons for easily installed Kubernetes applications
- Ability to test the latest versions of Kubernetes and installed Kubernetes applications
- Cross-platform (Linux and macOS)
- Automatic configuration of a load-balancer
To install k8kreator
paste that in a macOS Terminal or Linux shell prompt:
curl -fsSL https://raw.githubusercontent.com/sepen/k8kreator/main/k8kreator | bash -s self install
- The one-liner command from above installs
k8kreator
to its default,$HOME/.k8kreator
and will place some files under that prefix, so you'll need to set your PATH like thisexport PATH=$HOME/.k8kreator/bin:$PATH
. - The installation explains what it will do, and you will see all that information. Consider adding this line to your ~/.bashrc or ~/.bash_profile or make sure to export this PATH before running
k8kreator
. The installation explains what it will do. - The one-liner installation method found on
k8kreator
uses Bash. Notably, zsh, fish, tcsh and csh will not work.
Create a new cluster
k8kreator cluster create
Install some addons
k8kreator addons install metrics-server metallb ingress-nginx jenkins
Run k8kreator help
for more information
Run k8kreator env
to get a complete list of environment variables. Most notable are:
Variable | Defaults | Description |
---|---|---|
K8KREATOR_TARGET | k8kreator.kind.local | Active cluster target. Run 'k8kreator cluster list' to get all available targets |
K8KREATOR_DEBUG | 0 | Indicate whether or not k8kreator is running in Debug mode |
K8KREATOR_NOCOLOR | 0 | Disable colored output messages. Set K8KREATOR_NOCOLOR=1 to disable |
K8KREATOR_BINDIR | $HOME/.k8kreator/bin | Path location for binary files |
K8KREATOR_SRCDIR | $HOME/.k8kreator/src | Path location for source files |
Targets are the reference units to create a cluster (name.engine.domain
). By default k8kreator provides the following targets:
Name | Kubernetes | Tools |
---|---|---|
k8kreator.kind.local | v1.31.0 | kind=0.24.0 kubectl=1.31.0 helm=3.16.1 |
k8kreator.k3d.local | v1.30.2-rc3+k3s1 | k3d=5.7.4 kubectl=1.31.0 helm=3.16.1 |
k8kreator.minikube.local | v1.31.0 | minikube=1.34.0 kubectl=1.31.0 helm=3.16.1 |
Local targets are located in ~/.k8kreator/src/targets
At the moment the supported engines are the following:
Name | Description |
---|---|
kind | A tool for running local Kubernetes clusters using Docker container “nodes” |
k3d | A lightweight wrapper to run k3s (Rancher Lab's minimal Kubernetes distribution) in docker |
minikube | A tool for running a local Kubernetes cluster, focusing on making it easy to learn and develop for Kubernetes |
Addons are maintained extensions used for added functionality to clusters. At this moment the addons available are the following:
Name | Description |
---|---|
metrics-server | It collects resource metrics from Kubelets and exposes them in Kubernetes apiserver through Metrics API |
metallb | A load-balancer implementation for bare metal Kubernetes clusters, using standard routing protocols |
ingress-nginx | An Ingress controller for Kubernetes using Nginx as a reverse proxy and load-balancer |
kubernetes-dashboard | Web-based UI that allows administrators to perform basic operating tasks and review cluster events |
kubewatch | Kubernetes watcher that publishes notifications to Slack/hipchat/mattermost/flock channels |
jenkins | Continuous integration/continuous delivery and deployment (CI/CD) automation software DevOps tool |
kube-prometheus-stack | kube-prometheus-stack collects Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator |
promtail | An agent which ships the contents of local logs to a private Grafana Loki instance or Grafana Cloud |
loki | Horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus |
tempo | Easy-to-use, and high-scale distributed tracing backend |
localstack | Cloud service emulator that can run your AWS applications or Lambdas entirely on your local machine |
Local addons are located in ~/.k8kreator/src/addons
The idea behind k8kreator
is to be able to run clusters with different Kubernetes engines and have a homogeneous way to install and maintain cluster addons. It was primarily designed for testing Kubernetes itself, but may be used for local development or CI (you can use it in production but it's not what it's designed for, so do it at your own risk).
With Docker on Linux, you can send traffic directly to the load-balancer’s external IP if the IP space is within the docker IP space.
On macOS and Windows, docker does not expose the docker network to the host. Because of this limitation, containers (including nodes) are only reachable from the host via port-forwards, however other containers/pods can reach other things running in docker including load-balancers. You may want to check out the Ingress Guide as a cross-platform workaround. You can also expose pods and services using extra port mappings.
On macOS you can try docker-mac-net-connect to use a load-balancer's external IP.