Framework for managing random scripts and binaries

I always had a conundrum about how to manage the scripts and binaries downloaded randomly from the internet. One way is to put them in the global PATH directory like /usr/local/bin, but I am sceptical about it. There are a couple of things I wanted to solve. How do you update these scripts and binaries? How to do it consistently across all my machines? How to make it easier to have my setup available on any new Linux machine(or even container) I setup? How to do it without sudo? ...

July 18, 2020 · 5 min · Suraj Deshmukh

Make static configs available for apiserver in minikube

If you want to provide extra flags to the kube-apiserver that runs inside minikube how do you do it? You can use the minikube’s --extra-config flag with apiserver.<apiserver flag>=<value>, for e.g. if you want to enable RBAC authorization mode you do it as follows: --extra-config=apiserver.authorization-mode=RBAC So this is a no brainer when doing it for flags whose value can be given right away, like the one above. But what if you want to provide value which is a file path. Because you will have to make that file available for apiserver. And this apiserver runs as a static pod inside minikube. How do you make the file available to that process inside pod inside minikube? ...

January 20, 2019 · 3 min · Suraj Deshmukh

Recreate Kubernetes CVE-2017-1002101

A volume mount CVE was discovered in Kubernetes 1.9 and older which allowed access to node file system using emptyDir volume mount using subpath. The official description goes as follows: In Kubernetes versions 1.3.x, 1.4.x, 1.5.x, 1.6.x and prior to versions 1.7.14, 1.8.9 and 1.9.4 containers using subpath volume mounts with any volume type (including non-privileged pods, subject to file permissions) can access files/directories outside of the volume, including the host’s filesystem. ...

January 14, 2019 · 2 min · Suraj Deshmukh

Old laptop setup reference

I have this old PC Dell Inspiron 1525 with 2GB RAM and 32 bit dual core processor and I wanted to install fedora on it, but I cam accross few problems which I am documenting for further reference. Wifi device not detected The wifi drivers are not loaded by default, so followed this blog, basically do following: export FIRMWARE_INSTALL_DIR="/lib/firmware" wget http://mirror2.openwrt.org/sources/broadcom-wl-5.100.138.tar.bz2 tar xjf broadcom-wl-5.100.138.tar.bz2 cd broadcom-wl-5.100.138/linux/ sudo b43-fwcutter -w /lib/firmware wl_apsta.o Slow boot problem Since the boot process is very slow so add this line to /etc/default/grub ...

December 30, 2018 · 1 min · Suraj Deshmukh

HTTPS during development using 'mkcert'

It’s always a hassle creating certificates and lot of technical jargons involved. This can be simplified, using mkcert. Install by following one of the steps mentioned in the docs. Once installed just run: $ mkcert -install Created a new local CA at "/home/hummer/.local/share/mkcert" 💥 [sudo] password for hummer: The local CA is now installed in the system trust store! ⚡ The local CA is now installed in the Firefox and/or Chrome/Chromium trust store (requires browser restart)! 🦊 This has installed the local CA. Now all you need to do is create a new certificate. ...

August 14, 2018 · 2 min · Suraj Deshmukh

vscode Shortcuts

This post has shortcuts that are generic and golang specific as well. This post will edited from time to time. Shortcuts Toggle side bar Ctrl + B Project explorer in side bar Ctrl + Shift + E Project wide search in side bar Ctrl + Shift + F Source control in side bar Ctrl + Shift + G Copy entire line Ctrl + C (without any selection) Delete entire line Ctrl + Shift + K ...

February 22, 2018 · 3 min · Suraj Deshmukh

Static Pods using Kubelet on Fedora

I wanted to try out Standalone Kubelet Tutorial of Kelsey Hightower by myself but I could not follow it as it is, because it was firstly on GCE and secondly it uses CoreOS, but since I am very familiar to Fedora I thought of following that tutorial on it. To get a quick setup of a fresh Fedora machine use Vagrant. I have used Vagrantfile available here. This blog is only replacement of section Install the Standalone Kubelet in tutorial. ...

September 23, 2017 · 2 min · Suraj Deshmukh