View on GitHub

docker-devbox

[DEV] Docker stacks to quickly setup a dev environment and test some tools.

Kind - Quickstart with Ingress Controller and more…

Helper to create a local Kubernetes in docker (kind) cluster with Ingress, NetworkPolicy support (with canal or calico) and RWX PersistentVolume (with extraMounts).

Requirements

Description

kind/quickstart.sh script performs the following operations :

Parameters

Name Description Default value
KIND_CLUSTER_NAME The name of the kind cluster devbox
KIND_WORKER_COUNT The number of worker node 3
KIND_CNI Customize CNI using “default”, “calico” or “canal” (note that default doesn’t supports NetworkPolicies) default
KIND_ADMISSION_PLUGINS Allows to customize admission plugins NodeRestriction,ResourceQuota
DEVBOX_INGRESS (1) Allows to install either traefik or nginx traefik
KIND_INGRESS_READY Allows to disable extraPortMappings on ports 80 and 443 1
DOCKERHUB_PROXY Allows to use a mirror for DockerHub ""
KIND_OIDC_ISSUER_URL (2) Allows to enable OIDC authentication ""

(1) Note that k8s-install.sh must use the same value. (2) Do not add useless “/” (${KIND_OIDC_ISSUER_URL}/.well-known/openid-configuration must exists)

Usage

# Delete cluster if exists
kind delete clusters devbox

# Create kind cluster and deploy
bash kind/quickstart.sh

How it works?

An helper script ( kind/config/generate.sh ) allows to generate kind configuration with some options :

# Number of worker nodes
export KIND_WORKER_COUNT=5
# enable OIDC auth on Kubernetes API 
export KIND_OIDC_ISSUER_URL=https://keycloak.quadtreeworld.net/realms/master
# use a mirror for dockerhub
export DOCKERHUB_PROXY=https://docker-mirror.quadtreeworld.net
# Install custom CNI (required for NetworkPolicies)
# default, calico or canal
export KIND_CNI=calico

# Generate config to create kind cluster
bash kind/config/generate.sh

Ressources