Skip to content

brakmic/miniDevOps

Repository files navigation

miniDevOps

A Docker image that bundles 20+ Kubernetes and infrastructure tools on Debian Linux. Pull it, start a container, and you have a working cluster in minutes.

shell_welcome_msg

Docker Pulls Docker Image Size

Quick Start

docker pull brakmic/devops:latest

Linux / macOS:

docker run --rm -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v ${PWD}:/home/minidevops/local \
  --network=host \
  brakmic/devops:latest

Windows (PowerShell):

docker run --rm -it `
  -v //var/run/docker.sock:/var/run/docker.sock `
  -v ${PWD}:/home/minidevops/local `
  --network=host `
  brakmic/devops:latest

Windows: Cgroup v2 Requirement

Kubernetes 1.35+ requires cgroup v2. Docker Desktop on Windows must use the WSL 2 backend with the unified cgroup hierarchy enabled. Without this, Kind clusters fail during kubelet startup with a health check timeout.

  1. Enable the WSL 2 engine in Docker Desktop under Settings > General.
  2. Create or edit %USERPROFILE%\.wslconfig:
[wsl2]
kernelCommandLine = cgroup_no_v1=all systemd.unified_cgroup_hierarchy=1
  1. Restart WSL and Docker Desktop:
wsl --shutdown

Verify the change by running docker info --format '{{.CgroupVersion}}'. The output should be 2.

Once inside the container, create a cluster:

./create_cluster.sh my-cluster

The socket mount lets the container talk to the host Docker daemon. The local volume mount at /home/minidevops/local persists files across container restarts. The cluster script creates a Kind cluster and deploys the NGINX Ingress Controller.

Included Tools

Tool Version Purpose
kubectl latest stable Kubernetes CLI, aliased to kubecolor
helm 4.1.3 Kubernetes package manager
terraform 1.14.8 Infrastructure as code
kind 0.31.0 Local Kubernetes clusters in Docker
k9s 0.50.18 Terminal UI for Kubernetes
stern 1.33.1 Multi-pod log tailing
kubecolor 0.5.3 Colorized kubectl output
skaffold 2.18.2 Continuous development for Kubernetes
flux 2.8.3 GitOps toolkit
kubeseal 0.36.1 Encrypt secrets for Git storage
operator-sdk 1.42.2 Build Kubernetes operators
kubelogin 0.2.16 Azure AD authentication for clusters
lazydocker 0.25.0 Terminal UI for Docker
popeye 0.22.1 Cluster sanitizer and linter
krew 0.5.0 kubectl plugin manager
kubectx 0.11.0 Switch between clusters
kubens 0.11.0 Switch between namespaces
usql 0.21.4 Universal SQL client
docker compose v2 Multi-container orchestration

Additional Packages

The image includes bash with completions, nano with syntax highlighting, vim, git, gcc, make, python3, pip3, pipenv, curl, htop, tree, openssl, iputils-ping, dnsutils, and hping3.

Python 3 and Pipenv are pre-configured with a virtual environment. Run pipenv install <package> to add dependencies and pipenv run python my_script.py to execute scripts.

Setup

The config.yml file contains a Kind cluster configuration you can adjust. The included create_cluster.sh script reads this config, creates the cluster, and deploys NGINX Ingress.

./create_cluster.sh my-cluster

mini_devops

On Windows, use the PowerShell equivalent:

.\create_cluster.ps1 -ClusterName MyClusterName

create_cluster_script

Persisting Cluster State

To keep your cluster across container restarts, copy .kube/config to the local volume before exiting:

cp ~/.kube/config ~/local/kubeconfig-backup

On the next run, restore it:

cp ~/local/kubeconfig-backup ~/.kube/config

Docker Image

Available on Docker Hub.

HOWTOs

Command Reference

kubectl

kubectl get pods -n kube-system

Kubernetes docs

helm

helm install prometheus prometheus-community/prometheus

Helm docs

terraform

terraform init && terraform apply

Terraform docs

operator-sdk

operator-sdk init --domain=example.com --repo=github.com/example-inc/my-operator
operator-sdk create api --group cache --version v1alpha1 --kind Memcached --resource --controller

Operator SDK docs

flux

flux bootstrap github \
  --owner=<your-user> \
  --repository=<your-repo> \
  --branch=main \
  --path=./clusters/my-cluster \
  --personal

Flux docs

docker compose

docker compose up -d

Compose docs

kind

kind create cluster --name my-cluster

kind docs

lazydocker

lazydocker

lazydocker

lazydocker repo

popeye

popeye -n kube-system -o yaml

Popeye docs

kubeseal

kubeseal --cert=publicCert.pem --format=yaml < secret.yaml > sealedsecret.yaml

kubeseal docs

stern

stern -n dev app=myapp

stern repo

skaffold

skaffold dev

Skaffold docs

kubelogin

kubelogin convert-kubeconfig -l azure

kubelogin repo

krew

kubectl krew install ctx

krew repo

kubectx / kubens

kubectx my-cluster
kubens dev

kubectx repo

usql

usql postgres://user:pass@localhost/mydb -c "SELECT count(*) FROM orders"

usql repo

License

MIT

Packages

 
 
 

Contributors