I applied and was recently awarded a Cloud-native Application Architecture scholarship by SUSE and Udactity. There were about 12,000 scholars all over the globe who took part in the course made up of 5 lessons in 2 months, with phase 1 ending August 2, 2021.
One of the exercises was to run Docker Desktop on my Windows 10 computer and build a docker image alpine:golang which will run a web application and display the infamous Hello World. I uploaded this docker image to my Docker Hub registry for use in a Kubernetes cluster. We needed to install Oracle VirtualBox, Hashicorp Vagrant, and run Kubernetes k3s cluster https://k3s.io/ to host this docker image. This worked well on my computer but I wanted to try the same exercise on my RPi which had a lot less resources and wanted to see how well it worked there.
I have a Raspberry Pi 3 running Raspian OS with 32GB of disk and 4GB of memory. I connected the RPi via wifi on my local LAN and have opened up an SSH session to it. First I install k3s by running "curl -sfL https://get.k3s.io | sh"
Next, I pick an ARM image with alpine:golang, but this image did not work and the pods continually restarted. I scoured the internet and found this repo below after trying out over 6 different ARM images
balenalib/raspberry-pi-alpine-golang:latest
Use the above in your docker file, build it using standard "docker build" command and save the image to your Docker hub registry. From your RPi over an SSH session, run a "kubectl deploy" command to deploy a new golang app using that Docker hub image. I found that the pods stayed up but I didn't get to fully test the "Hello World" golang go-helloworld app via http://192.168.0.1:6112 from my host computer. Trying to run it locally on the RPi via http://127.0.0.1:6112 is extremely slow and I fear it might be resource constrained.
Here is the day-to-day recap of the scholarship challenge documented here https://github.com/chromilo/udacity-suse-scholarship
Comments
Post a Comment
Thank you for your feedback.