Category: Opensource

  • Get access to a container in Kubernetes cluster

    With Kubernetes(K8s), there’s no need to do ssh user@host anymore since everything is running as containers. There are still occasions when I need shell access to a container to do some troubleshooting. With Docker I can do It’s quite similar in K8s However in K8s containers have random IDs so I need to know the…

  • Notes: BuildKite and Kubernetes Rolling Update

    This is kind of a textbook case that container is much more efficient than VM. The CI pipeline in comparison uses AWS CloudFormation to build new VMs and drain old VMs to do a rolling update, which takes around 10 minutes for everything even if it’s just 1 line of code changed. I did a…

  • Adding Annotation to Grafana Dashboards, with InfluxDB

    It’s very easy to add this super powerful annotations to Grafana charts. I followed the below instructions and created my first annotation in a few minutes on an existing Grafana + InfluxDB setup. https://maxchadwick.xyz/blog/grafana-influxdb-annotations 🙂

  • Install Shutter in Arch Linux

    It’s quite unexpected that in Arch Linux’s package database I couldn’t find Shutter, which is generally available in other Linux distributions. Although, it’s still possible to install Shutter in Arch. First I use pacaur as my AUR helper. Installation of pacaur can refer to this. Then it’s quite easy to get Shutter installed because it’s in AUR…

  • Kubernetes Tips: ConfigMap

    This is how to update a config map with 1 line: kubectl create configmap foo –from-file foo.properties -o yaml –dry-run | kubectl replace -f – I found it here: https://stackoverflow.com/questions/38216278/update-k8s-configmap-or-secret-without-deleting-the-existing-one And this is how to mount a config map created from a file as file(not super intuitive but a config map can only be mounted as…

  • Mining With Solar Power

    Here’s a Python script I wrote to check today’s sun rise/set times given a coordinate: https://github.com/raynix/solar-hours/blob/master/solar_hours.py It uses api.sunrise-sunset.org free API to get local sun rise/set time of today. It also takes time zone into consideration as the API only returns times in UTC time zone. It also cache the API result for a day so I’m…

  • Play a bit Kubernetes with Minikube

    I’ve just played a bit Kubernetes on my Arch Linux laptop, with Minikube. It’s easier than I thought. Since I’ve already installed VirtualBox from the start, I can use minikube right after I installed it with curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ The command I used to start…

  • Mining ZCash on Ubuntu Linux

    I didn’t quite believe that mining crypto currencies is viable as an individual, until I saw the news that AMD graphics cards were sold out because they’re good at mining Ethereum. To be convinced I tried to order AMD RX 570 from some online vendors, and they all cancelled my orders and refunded me shortly.…