Kubernetes Playground

Playground project for kubernetes exercises and local development.

Github Badge Github Badge

About this project

This project is all about a local Kubernetes installation for development purposes. It is running inside a virtual machine to avoid polluting the my development machine and to ensure portability.

Note that for learning and development purposes, it is not necessary to install a full-blown Kubernetes cluster. Instead Minikube is used. Minikube is a lightweight alternative that allows developers to quickly set up a single-node Kubernetes cluster on their local machine.

Minikube provides many of the core features of Kubernetes, such as the ability to deploy and manage containers, and allows developers to experiment and learn about Kubernetes without the need for a full-scale production cluster. Additionally, Minikube is a great option for development because it allows developers to work on their applications in a Kubernetes environment without the need for a complex production infrastructure.

Services started by this Project

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

puml-build-image

Docker Compose

The k8s Vagrantbox All reports its metrics to Prometheus. This allows for centralized collection of metrics, which can then be analyzed and visualized using a web-based UI provided by Grafana.

  1. Prometheus is an open-source monitoring system that collects metrics from various sources and stores them in a time-series database.

  2. Grafana is an open-source analytics and monitoring platform. It provides a web-based UI that allows users to visualize and analyze data from (in this case) Prometheus.

Container Name Image Unresolved include directive in modules/ROOT/partials/services-docker.adoc - include::AUTO-GENERATED:partial$environment/services-docker-table-body.adoc[]

Minikube

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

App URL

Demo App

http://localhost:3080

sommerfeldio/website:0.1.4

http://localhost:3888

How to use this project

  1. Install minikube and some tools like kubectl with src/main/provision/install.sh

  2. Startup minikube and the monitoring services with src/main/start.sh

  3. Expose the Kkubernetes Dashboard using src/main/expose-dashboard.sh

  4. Deploy apps to the cluster using src/main/deploy.sh

  5. Shutdown using src/main/stop.sh

How to use minikube

When using a custom Kubernetes Cluster (using minikube, kubeadm or the like), there is no LoadBalancer integrated (unlike AWS or Google Cloud). With this default setup, you can only use NodePort or an Ingress Controller. With the Ingress Controller you can setup a domain name which maps to your pod; you don’t need to give your Service the LoadBalancer type if you use an Ingress Controller.

To access the service through its IP from the minikube cluster, run minikube tunnel in a separate shell. Then look up the IP of your service in the Kubernetes Dashboard and access this IP and the correct port from your browser.

Prerequisites

A docker installation is needed to run minikube. To run all services Docker verseion 23.0.5 or greater is needed. This project is developed on Ubuntu Linux and is not tested with any other distribution (although it should work just fine with other distributions).

Risks and Technical Debts

See https://github.com/sebastian-sommerfeld-io/k8s-playground/issues?q=is%3Aissue+is%3Aopen+label%3Asecurity%2Crisk+ for all issus labeles as risk (= some sort of risk or a technical debt) or security (= related to security issues).

Contact

Feel free to contact me via sebastian@sommerfeld.io or visit my website https://www.sommerfeld.io.