How to setup self-signed certificate for Kubernetes Dashboard and expose it via load-balancer

Image for post
Image for post
Photo by Robert Anasch on Unsplash

In previous part we were talking about setting up Kubernetes Dashboard, and now we are going to focus on setting up Dashboard certificate and exposing it outside our cluster.

First we are going to expose our Kubernetes Dashboard via load-balancer. We will be using MetalLB. I was writing previously about how to set it up on Raspberry Pi Kubernetes cluster If you didn’t do so yet, please follow the link below

Let’s create new load-balancer service which will expose our dashboard. Create new file named kd-loadbalancer.yaml …


How to install and configure Kubernetes Dashboard

Image for post
Image for post
Photo by Franz Harvin Aceituna on Unsplash

It’s been a while since I wrote guid on setting up Kubernetes on Raspberry Pi cluster:

So, it is about time to talk about monitoring. This time we will be talking about setting up and configuring Kubernetes Dashboard.

Before we can begin, in order to be able to see cluster metrics and graphs, we first need to install first MetricsServer. I already wrote a guide about it’s installation, so let’s first go trough that guide before coming back and continue.

Now when that’s done let’s get Dashboard yaml file.

wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.1.0/aio/deploy/recommended.yaml

And install…


How to install and use MetricsServer to get quick stats for a Kubernetes cluster

Setting up and using Metrics Server for RaspberryPi Kubernetes cluster
Setting up and using Metrics Server for RaspberryPi Kubernetes cluster
Photo by chuttersnap on Unsplash

Some time ago I wrote a guide on setting up Kubernetes cluster on RaspberryPi:

After deployment, one of the first things people would like to see and monitor is cluster utilization. In this article I will explain how to install and use Metrics Server v0.4.1 to get some quick stats with kubectl top command.

Metrics Server collect CPU and memory utilization information from all nodes and the pods in the cluster and can be easily accessed by using kubectl top command.

First we will need to…


How to fix ice buildup at bottom of your self defrosting freezer

Frozen drainage of self defrosting freezer
Frozen drainage of self defrosting freezer
Frozen drainage of self defrosting freezer

Few weeks ago I noticed ice buildup at bottom of my self-defrosting freezer, my freezer. It was nothing dramatic at first, but there were more and more ice over time, and I ended up having to clean it every few days


Simple guide detailing how to update to latest Kubernetes version 1.17.1

Image for post
Image for post
Photo by Diego Fernandez on Unsplash

Upgrading Kubernetes cluster requires a bit more work, than typical update with package manager, but it is fairly straight forward and can be accomplished fairly quickly. In this guide I’m going to detail steps needed, accompanied with screenshots of each step.

Notice: As always, before proceeding please make sure you have a backup, there is always a chance that things can go sideways for various of reasons.

I recently noticed that there is a new version of Kubernetes v1.17.1 available and even though this version brings just some bug…


Easy way to monitor temperature of your Kubernetes Cluster

Raspberry Pi 4B — Kubernetes Cluster Temperature Monitoring with DaemonSets
Raspberry Pi 4B — Kubernetes Cluster Temperature Monitoring with DaemonSets
Photo by Kenny Luo on Unsplash

Introduction

There has been a lot of talk about Raspberry Pi 4B overheating issues. New firmware helped out with that, but wouldn’t it be nice to monitor temperature of all the nodes in our Raspberry Pi Kubernetes cluster? In this article I will describe how we can do that.

Cluster Setup

I wrote an article before about my cluster setup withRaspberry Pi 4B and if interested, you can find more details in post below.

Plan of attack

I thought that best way to do this might be to create and deploy agent application that will be running on all nodes, and have it deployed via DaemonSet…


Image for post
Image for post
Photo by Nicolas Picard on Unsplash

In the previous part, we initialized our master node and added worker nodes. Now we need to add networking to our cluster. We have many options here, but we are going to use Calico as that is what is used on AWS and GKE.

Project Calico — Installation

First, we need to download calico configuration file

curl https://docs.projectcalico.org/manifests/calico.yaml -O

CIDR IP block will automatically be detected so we can just apply yaml to our cluster

kubectl apply -f calico.yaml

This will take a minute or two, so we can monitor the progress with

kubectl get pods --all-namespaces

Once all pods are running we can…


Image for post
Image for post
Photo by Joseph Barrientos on Unsplash

In the previous part, we got our master and worker nodes prepared. With that in place, we can proceed with installing containerd runtime and Kubernetes to our Raspberry Pi cluster.

We won’t be dealing with Ansible and such, as we don’t have too many nodes, and doing is learning. So we are going to open a few terminal windows and ssh into all our nodes. First, let’s make sure everything is up to date and run on all nodes:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade


Image for post
Image for post
My Kubernetes cluster based on RaspberryPi 4B

Update

It’s been over a year since I posted this guide first time. It was due for an update, so in the lines below, you will find latest and greatest (and most importantly tested) information on how to get your cluster up and running.

Introduction

After thinking about it for quite a while, and reviewing pricing on popular cloud providers, I decided that the best option for my home lab would be to build my very own Kubernetes cluster based on Raspberry Pi 4B. I bought 4x4GB model, a new network switch, and got to work. I won’t bother you with hardware…

Adnan Strujic

IT professional with over 20 years of experience in the field with great passion for technology, space exploration and science fiction.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store