GithubHelp home page GithubHelp logo

hobby-k8s's Introduction

Genealogy

This is a hobby project used to deploy the webtrees

Provisioning

  • Purchase a cx21 VM from Hetzner, running Ubuntu
apt-get update && apt-get install -yq fish git snapd
chsh -s `which fish`

Install a kubernetes instance

We will use microk8s to run our single-node kubernetes cluster

# Install microk8s
sudo snap install microk8s --classic
# Allow us to use microk8s commands without sudo
# Obviously unnecessary if we are root...
# sudo usermod -a -G microk8s $USER
# sudo chown -f -R $USER ~/.kube
# Alias the kubectl command
alias mkctl="microk8s kubectl"
# Prepare some microk8s plugins
microk8s status --wait-ready
microk8s enable ingress dns storage dashboard helm3 metallb
# Provide the IP range as: <IP-of-VM>-<IP-of-VM>

Note: we need metallb to allow us to use the LoadBalancer service type. The LoadBalancer service type allows us to expose our services externally.

Install services

CertManager

LetsEncrypt TLS certificate are provisioned and renewed by certbot. To do this simply, install the jetstack cert-manager helm chart.

# Prepare Helm
microk8s helm3 repo add jetstack https://charts.jetstack.io
microk8s helm3 repo update
# Install cert manager
microk8s kubectl create namespace cert-manager
microk8s helm3 install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --version v1.4.0 \
  --set installCRDs=true

Install the services

# Clone the repo
git clone https://github.com/briggySmalls/hobby-k8s.git
cd hobby-k8s/
# Install all of our services
mkctl apply -k .
# Check that they are now running
mkctl get svc
# Create the ingress and letsencrypt certificates
mkctl apply -f ingress.yaml letsencrypt.yaml

hobby-k8s's People

Watchers

 avatar  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.