Go Completely Container Crazy with linuxserver.io!

  • 21 January 2024
  • 2 comments
  • 86 views

Userlevel 7
Badge +22

 Folks,

I have to admit it. I sometimes do things which don’t really make logical sense and border on the edges of idle lazy behavior. In fact perhaps lazy is the wrong word as these endeavors can often involve work or a certain amount of effort. Instead it is the fact that they might serve no real purpose and have no direct profitable result which has gotten me into trouble with parents, spouse, teachers, professors and a whole lineup of bosses. 

The video game playing of course comes to mind but then there are other things as well. I remember very clearly the fist time I found a flight app on my phone. What followed were whole afternoons spent in the backyard looking up at the sky and then finding the airplane on my app to reveal all the juicy details of the flight, destination, airline, airplane type and even altitude. Something similar took place when a maritime app appeared, although this time I was on the beach and could feign sunbathing. 

This morning yet again I was struck by a nerd bug. While innocently browsing through my LinkedIn feed I spotted a post about a fellow running Desktops in containers. I hurriedly headed to the website and a complete morning was blown away of any useful activity.

Lets go crazy with containers!

I want to see if I can run some desktops in containers and then access them from browser at the same time. Why? Well for no reason other than this is so cool!

The website is https://www.linuxserver.io and more precisely the webtop images  https://docs.linuxserver.io/images/docker-webtop/ although I will wander away to other images later in the post. 

webtop

Let’s get started. Fire up your local Kubernetes distribution. In my case I am using Rancher Desktop (for which a new version just came out!) 

Rancher Desktop
​​​​​​

I am on windows and have turned on WSL ubuntu integration so will get my terminal up and running

WSL Ubuntu
Terminal

The Webtop page provides a list of images and desktops:

List

Ok first to run will be ubuntu with the xfce desktop, remember I am using bash aliases so instead of typing kubectl I can just type k

If you would like to set this up as well go to the begining of the cheat sheet and follow the instructions to setup : https://kubernetes.io/docs/reference/kubectl/quick-reference/

Kubectl alias and autocomplete

 

If not just type kubectl where I am typing k

k run webtopubuntu --image=lscr.io/linuxserver/webtop:ubuntu-xfce
ubuntu with xfce

Now to run alpine with the kde desktop:

k run webtopalpine-kde --image=lscr.io/linuxserver/webtop:alpine-kde
Alpine with Kde

 

After waiting a bit for the images to download the pods were running:

Running Pods

 

Now the documentation claims that these desktops can be reached on ports 3000 for http and 3001 for https.

I will create a Node Port service for both of these then look up the Node Port so that I can access these on my browser and will use https:

k expose po webtopubuntu --port=3001 --target-port=3001 --type=NodePort

and 

k expose po webtopalpine-kde --port=3001 --target-port=3001 --type=NodePort
Sevices

Looking at the ports column I see that my webtopubuntu pod is exposed on port 31777 and my webtoalpaine-kde pod is exposed on port 30533.

Wow! it works

Ubuntu XFCE

I will try the browser and see if I can get home to the Veeam Community Hub:

Veeam Hub

Now for Alpine Kde:

Alpine Kde

Parking them along side each other I could be forgiven for thinking I was dealing with VMs in a Hypervisor

side by side

Starting the conversation, but the Kde does not have ping installed:

No ping utility on the Kde Desktop

Now I wonder what my buddy Hacker Henry would do? Hacker Henry is a fictional character who may soon appear on the hub in order to try and hack Linux Veeam repositories.

Hacker Henry would see if he can get root and simply install software in the container!

Guess what?

apt is there and sudo works too!
sudo apt install inetutils-ping
Ping installed

Now Henry the Hacker is a benevolent hacker who gives to charities and would never do anything wrong so he would suffice to just ping both desktops at the same time. A bad hacker though could get up to no good so always restrict your containers and never run as root.

Container IPs
Containers Ta​​​​​lking to one another

Now that was fun but looking at the list of other container images and one can simply not resist.

Wireshark, Chromium?

having fun

Exposing the pods as we did for the ones above and then opening them in a browser:

exposing the pods

Looks like any other browser right? but we know the secret 😉

Chromium running in a container
Look at the Vivaldi address

Now for Wireshark, time to call Hacker Henry back:

Wireshark running concealed in a Pod

It was time to finish but one last piece of fun

Libreoffice

Why not run office in a browser from a pod in Kubernetes?

Libreoffice

What an array of enjoyment:

Sunday morning

After exposing in the exact same manner as the above pods I have office:

Welcome to the Office

Who just can’t wait to start working in a spreadsheet on the weekends? NOT I! Unless of course it is running in a Kubernetes Pod!

Spreadsheets

My art career is just beginning

Draw

I have always disliked powerpoint and all other presentation software. This is the result of having to bear years of obsessively boring presentations, but LibreOffice’s Candy Template running in a Pod has me seeing things differently now 

 


2 comments

Userlevel 7
Badge +20

Very interesting topic for sure but damn that was a long post. 😜🤣

Userlevel 7
Badge +22

Very interesting topic for sure but damn that was a long post. 😜🤣

And I had to stop myself too. A few other images in there are very interesting. Keep in mind there is not state so anything you create will be gone if you restart the container. However, you can add a pvc 😁. I might do that next time for the libreoffice pod then save a doc and then bring it up in my laptop word application.

Comment