I have used a simple tool for many years to manage the development software I need on my Linux workstation:
The installation is very simple has highlighted on their home page:
curl -s "https://get.sdkman.io" | bash
A bit scary to be running a script that you download straight into a shell but you can do as you see fit to examine the script first if you prefer.
I use it to install Java, Gradle, Kotlin, Spark, VisualVM and it allows you to try a few other framework. You can even decided which Java vendor you want to use.
A big advantage is that it installs all these software in your home directory and it does not affect the system. You can also quickly switch from a version to another and that has proven very useful more than once.
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
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'
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.
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.
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.
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.
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.