Setup Meross Smart Garage Door Opener with Merlin Roller door
Instead of talking about Kubernetes and Observability, this post is all about home automation. I have long been wanting to make my garage door control a bit smarter than using the usual remotes. Recently I was finally able to found a cheap and easy solution! It all started with this Ozbargain deal. So this post I’ll guide you through the steps I followed to set up Meross Smart Garage Door Opener (MSG100) with Merlin Roller Door (MR555MYQ).
2024-12-27    
How to monitor Python app in Kubernetes with New Relic APM
Running a Python Flask web app on Kubernetes without monitoring is like driving without a dashboard: you won’t know when things go south until they do! Here’s how to set up New Relic APM for your app with minimal fuss (and a little fun). Pre-requisites Python and Docker ready to roll locally. A working Kubernetes cluster (local or cloud-based). A New Relic account (Free tier is fine). Step1: Create the app Python Flask makes building a web app as easy as pie 😜.
2024-12-15    
My Cka Experience
Recently I was able to tick CKA off my TODO list. It’s a interesting and unique exam in compare to other certs I have done in my career. Below are some points I want to share to help out folks who plan to take the exam. Was it hard? The exam is not super difficult in my opinion. My daily job gives me plenty of exposure to different Kubernetes issues. So I was relatively comfortable with the technology itself.
2024-09-27    
Fix Ubuntu APT Update Error After Kubernetes Package Repo Change
Kubernetes legacy package repositories (apt.kubernetes.io and yum.kubernetes.io) have been deprecated and frozen starting from September 13, 2023. It is strongly recommended to use the new package repositories hosted at pkgs.k8s.io. It is also required in order to install Kubernetes versions released after September 13, 2023. The new package repositories provide downloads for Kubernetes versions starting with v1.24.0. Ubuntu packages update will fail with 404 Not Found error if you have Kubernetes packages still point to the deprecated repositories.
2024-03-11    
Fix Docker Container Golang Execute Format Error
Bumped into error Exec format error when tried to run a Go binary within a Docker container. The Go binary is compiled from my M2 Macbook. M2 Macbook uses ARM CPU arch. As a result the Go binary was by default complied with ARM CPU arch, which is different from the Docker image’s amd64 CPU arch. Hence the execution format error. To fix it, you can take two approaches. First, we can build the Go binary within the Docker image.
2023-12-10    
Kubernetes Cluster Fail to Start with Error: Error getting node
After a recent power outage, my Kubernetes cluster failed to come back online. I cannot connect to kube-apiserver through kubectl anymore. Upon checking the controller node, I can see these errors with kubelet service. Feb 03 00:43:06 tom-lab1 kubelet[3475]: E0203 00:43:06.555186 3475 kubelet.go:2422] "Error getting node" err="node \"tom-lab1\" not found" Feb 03 00:43:06 tom-lab1 kubelet[3475]: E0203 00:43:06.656323 3475 kubelet.go:2422] "Error getting node" err="node \"tom-lab1\" not found" In kube-apiserver logs /var/log/container/kube-apiserver-tom-lab1_kube-system_kube-apiserver-2bec70209c1231c69a6501aea951f4ff5bed1996174028cd7e0396b2c4dc34e0.log I can see the errors below.
2023-02-11    
Deploy Metrics-server in Kubernetes with TLS enabled
Metrics-server is one of the most common service deployed in their Kubernetes clusters. It is designed to be used for autoscaling purposes. In my case, I simply want to have a way to easily check my nodes status with kubectl top node. In this post I will walk you through the steps I took to get metrics-server deployed on a local Kubernetes cluster. There are a few interesting issues I bumped into along the way.
2022-11-10    
Run Pihole on Kubernetes
In this post I will show how I deployed Pihole onto my local Kubernetes cluster. In compare with some other online tutorials, this deployment saves Pihole configuration onto persistent volumes, so you won’t need to reconfigure everything after pod recreation. By using LoadBalancer, original client IPs are captured correctly in my Pihole instead of seeing everything was from the Cluster IP. If you want to learn how to build your own local Kubernetes cluster, read this post.
2022-10-16    
How to remove NotReady Pods from Kubernetes
Problem You got a pod left in NotReady status due to failed helm chart installation or resource deployment. ➜ ✗ kubectl get pods NAME READY STATUS RESTARTS AGE release-0.11-kube-promethe-admission-create-7j7fz 1/2 NotReady 2 8m1s Tried to remove the pod with kubectl delete pod will just cause the pod to be recreated. Solutions Uninstall helm chart Run helm ls -A to list all current installed charts. Check the chart status. NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION tomlab default 1 2022-09-26 09:30:38.
2022-10-12    
Build Full Stack Webapp Using Cloudflare Worker and Github Pages
I have been following the COVID situation in Shanghai lately. Intentionally or not, it is surprisingly hard to find a daily chart to reflect the proper case numbers overthere. To solve this problem, I decided to build a webapp just does exactly that: a simple chart the displays Shanghai daily COVID cases that includes both symptomatic and asymptomatic cases. The overall design includes a backend API that provides daily numbers in JSON format, and a front-end page that presents the data in the form of an area chart.
2022-04-20