Category: Opensource

  • Time Machine for Arch Linux

    I’ve been using Arch Linux for some years, and it’s still my favorite Linux distribution. The feature that distinguished Arch from others is its rolling release which means there’s no such a thing called version in Arch. Using latest packages in Arch is the norm. However living on the edge means it’s not quite safe. […]

  • Kubernetes External Service with HTTPS

    This is a quick example to assign an SSL certificate to a Kubernetes external service(which is an ELB in AWS). Tested with kops 1.8 and kubernetes 1.8. — apiVersion: v1 kind: Service metadata: name: my-https-service namespace: my-project labels: app: my-website-ssl annotations: “arn:aws:acm:ap-southeast-2:xxx:certificate/xxx…” “http” “https” ‘3600’ spec: type: LoadBalancer selector: app: my-website […]

  • Get access to a container in Kubernetes cluster

    With Kubernetes(K8s), there’s no need to do ssh [email protected] 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 docker exec -ti <container_id> /bin/bash It’s quite similar in K8s kubectl exec -ti <container_id> — /bin/bash However in […]

  • 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. 🙂

  • 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 -o yaml –dry-run | kubectl replace -f – I found it here: 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: It uses 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 […]