-
Working with a Big Corporation
So it’s been a while since I started this job in a big corporation. I always enjoy new challenges, now my wish got granted. Not in a very good way. The things work in a quite different manner here. There are big silos and layers between teams and departments, so the challenges here are not…
-
Nicer Deployment with Kubernetes
The default strategy to do rolling update in a Kubernetes deployment is to reduce the capacity of current replica set and then add the capacity to the new replica set. This probably means total processing power for the app could be hindered a bit during the deployment. I’m a bit surprised to find that the…
-
Ansible, Packer and Configurations
I use Ansible as provisioner for Packer, to build AMIs to be used as a base image of our development environment. When Ansible is used by Packer, it’s not quite intuitive whether it’s using the same ansible.cfg when I run ansible-playbook command in a terminal. Here’s how to make sure Ansible in Packer session will…
-
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…
-
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…
-
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…