Giter VIP home page Giter VIP logo

kubernetes-playground's Introduction

Kubernetes Playground

A playground for getting familiar with Kubernetes. Plan to address the following components:

  • Ingress
  • Deploy opensource microservices with Helm
  • Monitoring with Kubernetes (Metric, Log, Trace)
  • Taint & Tolerance
  • Deploy own application by writing own Helm Charts

Development Environment

Here is the environment description when I am creating this stack.

Operating System

  • Windows 10

Windows Subsystem for Linux 2 (WSL2)

KinD (Kubernetes in Docker)

Setup Instructions

WSL2 Side

The dependencies like kind, kubectl can be installed and spin-up cluster inside WSL2.

  1. Clone the repository
    git clone https://github.com/K-T-Ng/kubernetes-playground.git
    cd kubernetes-playground
  2. Install make
    sudo apt-get install make
  3. Install dependencies (kind, kubectl and helm)
    make install-prerequisite get-helm-charts
  4. Spin up cluster, this requires some waiting time (based on your network speed, due to pulling images are needed)
    make create-cluster
    make install-common check-common
    make install-monitor-backend check-monitor-backend

Windows 10 Side

In order to make the Ingress works (e.g. If you want to access application inside KinD using DNS name rather than IP & Port), you may need to config some DNS settings in Windows 10 side.

The principle of this setting is to fake the local DNS, route FQDN to 127.0.0.1. Then the chain is something like the following:

graph TD;
   FQDN_FROM_BROWSER-->LOCAL_DNS-->CONTAINER-->NGINX_INGRESS_CONTROLLER-->SERVICE-->POD;
  1. You may find the hosts setting file in C:\Windows\System32\drivers\etc.
  2. Open hosts file, add the following content.
    127.0.0.1 grafana.local prometheus.local jaeger.local otel-collector.local
  3. Save it into somewhere you can access (e.g. Desktop)
  4. Drag the file to C:\Windows\System32\drivers\etc and replace the existing hosts file. This enable us to access the UI/Endpoint using human readble DNS name.

Clean Up Instruction

Delete the KinD cluster by issuing the following command:

make delete-cluster

Overall Architecture

![./docs/kubernetes-playground.drawio.png]

Reference

kubernetes-playground's People

Contributors

k-t-ng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.