Skip to content

Xtigyro/kindadm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kindadm

Create and administer a local one or multi-node Kubernetes cluster(s) in Docker container(s) with properly configured Helm, Ingress Controller, MetalLB, Metrics Server, and Kubernetes Dashboard with simple interactive commands.

Supported Opt-In Software: Docker Container Registry, and Weave Scope.

Quick Start

To create a local one or multi-node Kubernetes (K8s) cluster(s) - please run:

## extra args are optional.
#
kindadm --nodes=[1-99] --k8s_ver=1.[x].[x] --helm_ver=[2/3].[x].[x]

To purge interactively any created cluster(s):

kindadm --purge

Helper Menu

# kindadm -h

Usage:
    --all-labelled,-al      Set labels on all K8s nodes.
    --all-tainted,-at       Set taints on all K8s nodes. A different label can be defined.
    --create-registry,-cr   Create local container registry for K8s cluster(s).
    --half-labelled,-hl     Set labels on half K8s nodes.
    --half-tainted,-ht      Set taints on half K8s nodes. A different label can be defined.
    --helm_ver,-hv          Set Helm version to be installed.
    --k8s_ver,-v            Set K8s version to be deployed.
    --list-oa,-loa          List supported optional app(s).
    --nodes,-n              Set number of K8s nodes to be created.
    --opt-apps,-oa          Deploy supported optional app(s).
    --purge,-p              Purge interactively any existing cluster(s) and related resources.
    --sys_wide,-sw          Install prerequisites system-wide.
    --help,-h               Prints this message.
Example:
    kindadm -n=2 -v=1.19.1 -hl='nodeType=devops' -ht -oa=weave-scope -cr -hv=2 -sw

Opt-In Components

Opt-In Apps

Access Deployed Services

Kubernetes Dashboard

To access Kubernetes Dashboard from your local workstation, you must create a secure channel to your Kubernetes cluster. Run the following command:

kubectl proxy

Now you can access the dashboard at:

http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:https/proxy/.

Weave Scope

To access Weave Scope (if deployed) from your local workstation, run the following command:

kubectl port-forward -n weave svc/weave-scope-weave-scope 80

Now you can access the Weave Scope Frontend at:

http://localhost:80.

Prerequisites

By default kindadm does the following:

  • Checks and advises (no install) on the system-wide prerequisites:
  1. Linux Docker Container Runtime.
  • Checks and installs in a self-contained .cache dir:
  1. kubectl binary.
  2. helm binary.
  3. Helm plugins: helm-diff.
  4. helmfile binary.
  5. kind binary.

With --sys_wide flag the aforementioned binaries will be installed system-wide (in /usr/local/bin dir).

NOTE: Changes are applied only if needed.

Credits

My name is Miroslav Hadzhiev - a Cloud & DevOps Engineer located in Sofia, Bulgaria. I'm glad that you liked my automation.

License

GNU General Public License v2.0