Tips, tricks and all things Kubernetes containers, cloud native, AI, etc
Xiaomi Mijia Ble Sensor MQTT on containers on Kubernetes
Intro As I mentioned in my previous post, everything was working flawlessly… except for a bluetooth issue in my raspberry pi 3 that basically renders bluetooth unusuable… but it is rebooted daily via a cron job, so minor issue :) (I know I know, I’m planning to do a better workaround…)
This was good enough, but a few days ago I decided to give k3sup a chance and install k3s (a lightweight Kubernetes distribution focused on ARM/IoT devices) in a spare pine64 that was gathering dust in a drawer :)…
Read more ⟶Xiaomi Mijia Ble Sensor MQTT on containers
As a geek, I use Home Assistant to simplify my home automation tasks (running in a container, of course!). Home Assistant is a really nice project and I recommend you to take a look at it if you want to get started in home automation.
One of the things I wanted to have was temperature and humidity sensors spread across the rooms in order to be able to see the current status and historical data… and it turns out it is supported out of the box using the mitemp_bt module.…
Read more ⟶metallb on OCP4 baremetal
UPDATE: I submitted a PR to the MetalLB docs on how to deploy MetalLB on OpenShift 4 and it has been merged \o/ so hopefully it will be live soon.
ORIGINAL BLOG POST: –8<–
This blog post illustrates my steps to deploy metallb on OCP4 running on baremetal.
Environment I have an OCP4 environment running in a Red Hat lab using 3 baremetal hosts as masters + workers deployed using openshift-metal3/dev-scripts…
Read more ⟶Metal3
In this blog post, I’m going to try to explain in my own words a high level overview of what Metal3 is, the motivation behind it and some concepts related to a ‘baremetal operator’.
Let’s have some definitions!
Custom Resource Definition The k8s API provides some out-of-the-box objects such as pods, services, etc. There are a few methods of extending the k8s API (such as API extensions) but since a few releases back, the k8s API can be extended easily with custom resources definitions (CRDs).…
Read more ⟶OCP4 UPI baremetal pxeless with static ips
Do you want to deploy an OCP4 cluster without using PXE and using static IPs?
I’ve got you covered. See my unsupported step by step instructions on how to doing it, including:
No PXE (pretty common scenario in big companies) Avoid installing stuff and use containers instead (instead yum/dnf install httpd, haproxy,… use containers) Use rootless containers if possible Use Fedora29/RHEL8 stuff (nmcli, firewalld, etc.) Enjoy!…
Read more ⟶Lock & unlock GNOME session using CLI
I personally use those commands with the gsconnect GNOME extension and KDE Connect on my Android phone:
Lock gdbus call --session --dest org.gnome.ScreenSaver --object-path /org/gnome/ScreenSaver --method org.gnome.ScreenSaver.Lock Unlock loginctl unlock-session && xset dpms force on …
Read more ⟶Bash tips & tricks
Bash variable with the content of a file NTPFILECONTENT=$(cat /etc/chrony.conf) This will store the ‘\n’ characters as well.
Display bash variable with the content of a file echo "${NTPFILECONTENT}" Beware the quotes
Append content to a bash variable with a new line NTPFILECONTENT="${NTPFILECONTENT}"$'\n'"pool ${ntp} iburst" Create files with heredocs cat << EOF > /your/file mycontent even with spaces EOF Some details:
You can use EOF or whatever you want. The EOF needs to be as it is, no whitespace before it.…
Read more ⟶Firewalld tips & tricks
Show all rules sudo firewall-cmd --list-all Redirect ports sudo firewall-cmd --zone="$(firewall-cmd --get-default-zone)" \ --add-forward-port=port=443:proto=tcp:toport=8443 --permanent sudo firewall-cmd --zone="$(firewall-cmd --get-default-zone)" \ --add-forward-port=port=80:proto=tcp:toport=8080 --permanent …
Read more ⟶Ignition tips & tricks
Ignition configuration explained https://coreos.com/ignition/docs/latest/configuration-v2_2.html
Notes:
file mode is decimal!!! file append = false to overwrite (otherwise it will be appended…) …
Read more ⟶OCP4 tips & tricks
I’ve migrated the content of this post to openshift.tips…
Read more ⟶