-
Golang and Docker Multi-Stage Build MK2
In my previous post I used Docker multi stage technique to build a Docker container image which only has the golang executable in a tiny Alpine Linux base image. I’ll go further to use the scratch base image which has basically nothing. Here’s the Dockerfile I tested on my own project, I’ve also added comments…
-
Deploying WordPress to Kubernetes with Kustomize
I’ve just migrated this blog site itself into the kubernetes cluster I built with Raspberry Pi 4s, and this post is about the steps and approach I used to achieve this goal. Yes, what you have been reading is served by 1 of the Raspberry Pi boards. First of all, a bit introduction on kustomize:…
-
Kubernetes at Home on Raspberry Pi 4, Part 3
Continue from part 2, this is mostly about installing ingress controller. In short, an ingress controller is like a single entry point for all ingress connections into the cluster. The reason I chose Flannel over other CNIs is that it’s lightweight and not bloated with features. I would like to keep the Pi 4s easy…
-
Kubernetes at Home on Raspberry Pi 4, Part 2
Continue from part 1 It’s recommended to change all Pi’s password also run ssh-copy-id [email protected] to enable SSH public key login. There are lots of steps to prepare before kubeadm is installed, so I made this ansible repository to simplify this repeating process. Please see here. The ansible role will do the following tasks: set…
-
Kubernetes at Home on Raspberry Pi 4, Part 1
I mostly followed/was inspired by this tutorial but with some tweak/fix to recent(Sep 2019) software versions. Also this is a pure Linux walk-through as I don’t use a Mac. I planned to build a home Kubernetes(k8s) cluster and migrate home servers including the one this blog is running on to the k8s cluster, for a…
-
Use FZF to Speed Up KUBECTL
FZF is general purpose option selector for Linux command line. By default fzf is an super-upgrade for the ctrl-r command history finder, but it is helpful for almost any scenario where you need to pick 1 item from a list. Here’s a tiny use case where I use fzf to select a kubernetes namespace and…
-
AWS Lambda with Single CloudFormation Template
This is just a quick snippet of CloudFormation template to deploy a Python 3.7 Lambda function embedded in the template. The source code inside ZipFile can contain up to 4KB. # CloudFormation templateAWSTemplateFormatVersion: 2010-09-09Resources: LambdaCode: Type: AWS::Lambda::Function DependsOn: – LambdaRole – LambdaPolicy Properties: Code: ZipFile: | import boto3 def handler(event, context): … Role: !GetAtt LambdaRole.Arn…
-
Golang and Docker Multi-Stage Build
I have noticed a common pattern amonst some new utilities such as kubectl, kops and terraform: There’s only 1 single executable file to install, and by ‘install’ it can be put anywhere as long as it’s in $PATH. This was before I learned some Golang but it’s easy to find out that the reason behind…