Kubernetes Secrets encoding gotcha

Kubernetes provides a neat concept for managing sensitive pieces of data, the Secret A Secret is an object that contains a small amount of sensitive data such as a password, a token, or a key. Such information might otherwise be put in a Pod specification or in a container image. Using a Secret means that you don’t need to include confidential data in your application code. Secret text is by default base64 encoded. For this reason it’s recommended that secret definitions are not published to git. ...

August 25, 2021 · 2 min

React environment variables in an nginx container

Your React app is ready to ship. Congratulations! Packaging for production is (and should) be different from your development configuration. In the case of Create React App the toolchain is rich, includes development productivity conveniences such as hot reloading, source maps and custom environment variables. This toolchain is mind blowingly productive as you develop the app, npm start and watch the magic unfold. At this point, its possible to put the React app one big (~1.7GB) happy container: ...

August 21, 2021 · 3 min

Debian install notes

I’m moving lots of my machines back to Debian in the yearning for rock solid stability and a complete distribution that just works. Debian was the first GNU/Linux I ever used as a teenager back in late 90s and I’ve fond memories of it. Starting with the official amd64 install guide. Preparation Make USB key I quickly discovered I want the image that includes proprietary firmware, so I can get my (nasty) wifi card working as quickly as possible. ...

July 11, 2021 · 3 min

Notes from the book Atomic Habits

I just read the kindle edition of Atomic Habits by James Clear. Its worth the time investment, giving practical ways for building desired habbits and more importantly, breaking bad ones. The habit loop The four stages of habit are an endless cycle. This habit loop is continually scanning the environment, predicting what will happen next, trying out different responses, and learning from the results. The cue triggers a craving That motivates a response That provides a reward That satisfies the craving and, ultimately, becomes associated with the cue 4 laws of behavior change The pillars of the book, are the four stages of the habit building process: ...

June 12, 2021 · 15 min

Binary Similarity Analysis Technical Paper

An academic paper I authored in May 2019, as part of studying Reverse Engineering at UNSW. Abstract Extracting meaningful semantic differences between software binaries without source code is difficult. This is a challenging problem due to the overwhelming amount of syntactic noise that small changes can result in at the assembly level. Curiously when it comes to program semantics the “signal from the noise” can be distilled in a manner that is both static and processor agnostic, through the application of control flow and graph isomorphism analysis, symbolic execution and theorem proving. The graph isomorphism problem has no known polynomial time algorithm (i.e. is NP) making brute force approaches computationally infeasible. By blending various static analysis techniques and applying some generalisations, consider a novel approach to overcoming the computationally infeasibility of this problem domain with a view to binary difference analysis. ...

May 29, 2021 · 17 min

Hiking pack system

Stacked packing system Inner pack Side pockets Front pocket Options Ditty bag Food Cold soak meal recipes Refried beans Pinto beans Cous Cous Veggies Oil wrap Potato Bomb Rice Bomb Oatmeal Cereal Useful resources Lessons learned April 2021 November 2021 Over the last year I have been experimenting with reducing the weight of my hiking pack when out on track. Reading books on ultralight hiking, has me with some strategies for doing so. ...

May 29, 2021 · 5 min

Gentoo Linux

The next step in my minimalist computing journey. Enter Gentoo, my first source based GNU/Linux distro. Pre-packaged binaries, which is the approach most other (binary based) distros take, must often cater for the lowest common denominator to ensure packages can run on lots of differing setups out in the wild. On a source based distro, I can articulate my specific needs (USE flags on Gentoo) to finely tune the binaries to my system. For example, as I plan to steer clear of software like systemd, kde and gnome, I can ensure support for these packages is NOT built into other program binaries I build for my system. ...

February 22, 2021 · 13 min

KVM virtualisation

The Kernel Virtual Machine is a hypervisor for Linux on hardware with virtualization extensions (Intel VT or AMD-V). It is deployed as a loadable kernel modules, kvm.ko, and either kvm-intel.ko or kvm-amd.ko. The KVM Debian Wiki rocks, and provides details on the basics including a great performance tuning section. Install Administration tasks User specific vs system wide VMs List VMs Start VM Shutdown VM Murder (hung) VM Autostart default NATed bridged network What if the default network interface is not listed How to extend / increase a partition Use network ISO source for new VMs Windows VM disk driver Install Easy instructions to get QEMU/KVM and virt-manager up and running on Arch. ...

October 31, 2020 · 4 min

Kubernetes

The name Kubernetes originates from Greek, meaning helmsman or pilot. Terminology Essentials Help Bash kubectl completion Web UI dashboard Pods Creating a pod Option 1: Imperatively with the CLI Option 2: Declaratively with YAML Port forwarding Managing pods Pod Health Deployments and ReplicaSets ReplicaSet Deployment Deployments with kubectl Deployment Options Rolling updates Blue Green Canary Rollbacks StatefulSets Services Service Types Port forwarding take 2 Services YAML NodePort example ExternalName example Testing Service and Pod with curl Storage Volumes Volume Types Viewing a Pods volumes emptyDir volume example PeristentVolumes and PeristentVolumesClaims StorageClasses Managing configuration with ConfigMaps and Secrets Defining ConfigMaps Consuming ConfigMaps Secrets Secret best practices Storing Secrets Using Secrets Secrets as environment variables Secrets as files Troubleshooting Logs Configuration verification Shell into Pod container The API General kubectl Waaay cool Samples node.js app microk8s Shell improvements PersistentVolume storage location Resources Terminology k8s is two concepts; the control plane and nodes. ...

August 18, 2020 · 20 min

Installing Arch Linux on the Pinebook Pro

Updated 2022-04-11: Installed a minimal version of Manjaro, a SLICK flavour of Arch The pinebook pro is a beautiful 64-bit ARM based laptop, that reminds me of the form factor of a modern macbook air, shipping with a premium magnesium alloy shell, 64GB eMMC and a 10,000 mAH battery. All this for $200. As a NIX machine, I’ve found Manjaro to be delightful. I have dreams of one day installing OpenBSD. ...

July 27, 2020 · 3 min