Getting started with microk8s

Overview

I built a k8s cluster on 3 Intel NUCs with microk8s that includes clustered storage using Mayastore (OpenEBS), snapshots, load balancing and control plane resilience.

Selecting Hardware

I chose Intel NUC devices specifically for their support of an extra 2.5" drive in addition to an NVMe OS drive …

more ...

Install and configure microk8s

Installation

You could of course do this with Ansible or any other orchestration tool. I didn't.

newgrp microk8s
sudo snap install microk8s --classic --channel=1.26/stable
echo alias mkctl=\"microk8s kubectl\" > ~/.bash_aliases
sudo usermod -a -G microk8s ubuntu
sudo chown -f -R ubuntu ~/.kube

# Dump the config to access …
more ...

Clear DNS cache on macOS

To clear your local DNS cache on macOS do the following:

dscacheutil -flushcache
sudo killall -HUP mDNSResponder

A simple wrapper for this (that might go in your bashrc) would be:

function clear_dns_cache() {
  echo "Clearing local DNS cache..."
  dscacheutil -flushcache
  sudo killall -HUP mDNSResponder
}
more ...

Testing Syslog from the CLI

Install a syslog server

This will get a basic rsyslog server running on UDP port 514.

brew install rsyslog
mkdir /tmp/rsyslog
rsyslogd -f /usr/local/etc/rsyslog.conf -i /usr/local/var/run/rsyslogd.pid

Config file

cat /usr/local/etc/rsyslog.conf
$ModLoad imudp
$UDPServerRun 514
$template RemoteLogs …
more ...

Build Unbound on ARM64

I have a pretty cool little cluster of ARM64 based Fire3 LTS computers I use for mini kubernetes clusters and generally running support services. I wanted to implement encrypted DNS for my local network without deploying a pre-built solution like pi-hole. This is the process I used to build package …

more ...