Quick Installation of K8S

The tutorials out there to install Kubernetes on your workstation are great but I simply need a quick series of steps. This is to install Micro-K8S on a Ubuntu workstation.

sudo snap install microk8s --classic

I also create a few aliases because typing the entire commands is a bit long

sudo microk8s kubectl get all -A


vi .bash_aliases

alias kgaa='sudo microk8s kubectl get all -A'
alias kga='sudo microk8s kubectl get all'
alias kg='sudo microk8s kubectl get'
alias kp='sudo microk8s kubectl get pods'
alias kn='sudo microk8s kubectl get ns'
alias kd='sudo microk8s kubectl describe'

source .bash_aliases

A Brave Browser

With all the tracking that exists today, I have been looking at minimizing what all these big corporations are collecting about me. There are many ways to do this but I decided to try the Brave browser.

It is easy to install on Ubuntu from these instructions: https://brave.com/linux/#linux

Only a few commands:

sudo apt install apt-transport-https curl gnupg

curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -

echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list

sudo apt update

sudo apt install brave-browser

It is done in less than 2 minutes.

The first time I ran Brave I changed the default search engine to be https://duckduckgo.com/ so that I am closing another door on the tracking.

I have been using it for a few weeks and I am very happy.

It is always interesting to see the number of items that have been blocked. There is a lot of tracking going on (obviously).

Why run Kubernetes at home

In a discussion with co-worker the question was asked (as a rhetorical one) and it got me thinking about it.

Why would you run Kubernetes at home?

There is the obvious reason that I am testing for work a certain configuration or an operator or a new version of a container. These are more work reasons and they just happen to be executed at home since so many of us work from home.

For my home network and setup, why would I run Kubernetes?

A similar setup that we could compare with is having a raid device for your storage need. Many options exists for home to allow you to store all the photos and movies. If you have a raid device you can then replace a failed hard disk and not lose any of your data.

Could we apply the same rationale to the application you need to run on your home network?

Plex has a container available. Imagine that you are running it on a node and if it has some hardware issue, you can still watch your movies without having to repair anything first.

What I wonder is how many other software that I use at home would benefit from this.

Installing OpenJDK 11 on macOS (again)

I have started to use SDKMan to simplify my life with installing and updating many software that I use regurlarly. Java is one of them. It is the simplest thing to install java with sdk man:

sdk i java 11.0.8.hs-adpt

As simple as that.

I can just use Java 11 from that point on. You can also install Java 8 and switch between both. Convenient when you have to maintain older software.

If I want to update to a new release, I simply have to type:

sdk ug java

Can it really get any easier?

I use the SDKMan on my linux laptop as well and it easily works on both.

I also manage gradle, spring-boot and spark with SDKMan so most of my coding tools are kept up to date with the same tool.

Learning Kotlin by building

It took longer than I want to admit to have a simple Koltin application build this morning. The build.gradle.kts needed a bit of tweaking to get a simple 3 class application with a single test to properly build.

Here is the content of the build.gradle.kts:

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.4.10"
dependencies {
repositories {
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "11"
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "11"


I just discovered this application for k8s and there is a lot to like. It allows me to look at a k8s cluster in a whole new way. It is so easy to see everything that is running and all the resources that have been created.

This is quite the upgrade from the command line to see things quickly. I am not abandoning the cli but I am certainly going to look here when I need to troubleshoot because I have a better view of everything that is on the cluster.

They want you to look at this software as the k8s IDE. I will have to explore a bit more to see how it can me another IDE for my use cases.

Command + Shift + .

Sometimes the simplest solution can solve so many little frustrations.

In this case, I simply wanted to see the hidden directories when selecting a directory in an application.

After a quick search, I realized that it was not a preference to change in the Finder but that I could simply press Command + Shift + . and see all the hidden directories in that window.

It allowed me to select a new JDK and tadam, my project is back to working.

Network Policies for a Namespace

It took me a couple of days of testing to realize my mistake with a network policy that I had.

What I wanted was to allow communication to a pod on a certain port for other pods in the same namespace. If the communication was coming from outside the namespace I was opening another port to let those happen.

The challenge I faced and that took me a while to fix was not as much with the network policy but with the fact that the namespace specification did not include a proper label. The network policy can only match on a label at this time and I was trying to get it to match on the name of the namespace.

The solution was to add a label to the namespace and then match with it.

I also learned to use the “kubectl describe netpol/nameofit” a lot to properly understand what k8s was understanding from the yaml I was submitting. I made typoes that did not prevent the network policy to be accepted but an extra dash on a line make a whole world of difference.

There are great examples of network policies with these recipes.


I have been deploying containers and creating applications on Kubernetes for the better part of the last couple of years. I should have written a lot more about the journey because there is so much to learn (by doing quite a few mistakes).

I should have learned by now that any of these great new ways of doing things that will simplify the delivery of applications is a journey where you are going to re-learn how to do what you have always been doing. The same “problems” exist in creating an application no matter the framework or language.

The new tool is going to address pain points from the last best framework ever and it will be very attractive to use the new one. The fun is in solving all the other problems that still exist and have not necessarily been addressed as well as the pain points that attracted you to it.

I had to re-learn so much about networking with Kubernetes because your micro-services all need to communicate with each other.

I had to learn a lot about Kafka because it is our messaging queue. Please don’t tell them that is what it is. It is so much more.

I had to learn about service mesh and got to the points of many memes about this one.

We had to learn so much about so many different applications and infrastructure pieces that the promise of delivering faster is not as true as we would have liked. Don’t get me wrong, I love learning but I hate over-promising and finding myself in a bad position.

The journey is far from done and I have an awesome team that is helping me and I hope that I am helping them along the way as well.

May the learning continue…

Installing OpenJDK 11 on MacOS

For some reason, I expected the installation was going to be a bit more complicated on MacOS. It is actually quite easy.

I downloaded the latest MacOS binaries from https://jdk.java.net/11/

I clicked the .tar.gz that I got to decompress it in the jdk-11.0.1.jdk directory.

I moved it to the directory for MacOS to pickup the new version:

sudo mv jdk-11.0.1.jdk /Library/Java/JavaVirtualMachines/

I was done with these steps.

You can test by running:

java -version


javac -version

to confirm that you see the new version:

openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)