Skip to content

The tiniest (but complete) Ansible project which sets up Kubernetes cluster

Notifications You must be signed in to change notification settings

plgrnds/microkube

Repository files navigation

Microcube

This project contains minimal Kubernetes ansible-based setup.

Usage

Update hosts.ini with the details of the hosts you want to run Kubernetes cluster on.

source setup.sh
ansible-playbook -i plgrid.ini playbooks/setup-base.yml

Kubernetes console

To access Kubernetes console install the kubecfg.p12 certificate which should be created inside artifacts directory. The default credentials are set to test/test.

Login using a bearer token. To get the token run:

ansible-playbook -i plgrid.ini playbooks/setup-base.yml --tags login

Then open your browser at

https://<your host>:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

Grafana monitoring

By default grafana monitoring is NOT installed. To install you can issue

ansible-playbook -i plgrid.ini playbooks/cluster/grafana

Then login to a box with port forwarding enabled (3000:localhost:3000) and issue

kubectl port-forward $(kubectl get  pods --selector=app=kube-prometheus-grafana -n  monitoring --output=jsonpath="{.items..metadata.name}") -n monitoring  3000

Spark

helm install --name spark stable/spark --set Worker.Cpu=1000m --set Worker.Memory=6G --set Worker.CpuTargetPercentage=100 --set Worker.DaemonMemory=6G --set Worker.ExecutorMemory=6G --set Worker.Replicas=6
helm install incubator/sparkoperator --namespace spark-operator --set createSparkJobNamespace=true --set sparkJobNamespace=test-ns

Useful resources

About

The tiniest (but complete) Ansible project which sets up Kubernetes cluster

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages