Author: admin

  • Don’t Panic When Kubernetes Master Failed

    It was business as usual when I was upgrading our Kubernetes cluster from 1.9.8 to 1.9.10, until it isn’t. From AWS console I can see the new instance for the master is running and the old one has been terminated. There’s 1 catch though, the IP yy.yy.yy.yy is not the IP of the new master…

  • Run Google Lighthouse in Docker Container

    Thanks to my Colleague Simon’s suggestion, I was introduced to Google Lighthouse, an opensource nodejs framework to use Google Chrome to audit a website’s performance. I like Lighthouse because: opensource good portability can run as CLI command or as a nodejs module Here’s a sample Dockerfile to have a container ready to run Lighthouse with…

  • Use Python to Check Difference between Directories Recursively

    I needed to track differences between software release packages, so that if anything changed dramatically, eg. some file missing or much smaller than expected, I can then get a notification to review the new potentially flawed package. I found that filecmp.dircmp class in Python is spot on for this job. Here’s my snippet to compare…

  • Upload Limit in Kubernetes Nginx Ingress Controller

    According to https://github.com/nginxinc/kubernetes-ingress/issues/21#issuecomment-408618569, this is how to lift the upload limit in Nginx Ingress Controller for Kubernetes after recent update to the project: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test-project-ingress namespace: test-project-dev annotations: kubernetes.io/ingress.class: dev nginx.ingress.kubernetes.io/proxy-body-size: 200m spec: rules: – host: test-project.dev.com http: paths: – path: / backend: serviceName: test-project servicePort: 80 And for now…

  • Auto Scaling in Kubernetes 1.9

    I updated my Kubernetes cluster from 1.8 to 1.9 recently, the upgrade process is very smooth, however the auto-scaling part seemed to be failing. Below are some notes on how I troubleshoot this issue. First to ensure I have both kops and kubectl upgraded to 1.9 on my laptop: Install kubectl 1.9: curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.9.10/bin/linux/amd64/kubect…

  • Command Line Recording Goes SVG

    Term To SVG is lovely little utility to record a terminal session into a .svg animation. And below is a recording of how I installed termtosvg myself on Arch Linux.

  • Manage AWS EBS Snapshot Life Cycle with Lambda

    The timing is not so great. The AWS Data Lifecycle Manager has been announced but I can’t wait for its release. So I decided to use AWS Lambda to do some snapshot lifecycle management. First a role for Lambda having full access to snapshots can be created via the console. To create snapshot with Python…

  • Building Dynamic CI Pipeline with BuildKite

    I was inspired by this BuildKite pipeline sample given by the support team: So in the above case, if the first 2 commands succeed, pipeline.deploy.yml will be loaded into the main CI pipeline. This implementation is just brilliant. I’m not sure if jenkinsfile can do dynamic pipeline like this, but at least jenkinsfile won’t look…