Reading Devices

I use different devices for consuming content from disparate streams, even for books. This post discusses each method鈥檚 various pros and cons and what fits best in what kind of circumstance. You can refer to the table at the end of the post, where I have broken down each comparison aspect. Physical Books This method of consuming knowledge became prevalent with Gutenburg鈥檚 printing press. Getting a new book always gives you that dopamine rush since it has a sense of newness, new cover, the smell of paper, etc....

June 30, 2021 路 13 min 路 Suraj Deshmukh
Self Signed Certificates

How to 'automatically' generate a self-signed TLS certificate for Kubernetes Admission Webhook Servers?

The previous blog talked about generating self-signed certificates using a binary. It was a manual, cumbersome process where you had to generate the certificates using a tool, embed them into a Kubernetes Secret via Helm chart, and then use it. There is a better way of doing it! Which is what this blog will discuss. We will use a Helm chart, which has a couple of Kubernetes Jobs that generates the self-signed certificate, embed them in a Kubernetes Secret and finally update the ValidatingWebhookConfiguration or MutatingWebhookConfiguration of your choice....

June 25, 2021 路 4 min 路 Suraj Deshmukh

How to create a Systemd daemon quickly?

If you have a script or a binary and want to run it as a Systemd service, keep following. This blog will show you how to take any such executable code and run it using Systemd. Sure, you can do similar stuff using Docker as well. Although there are certain downsides of using Docker (alone) for managing the daemons. Systemd is good at log management on the node over a Docker container....

June 19, 2021 路 2 min 路 Suraj Deshmukh
Golang and Kubernetes

How to import 'any' Kubernetes package into your project?

The client libraries that Kubernetes ships are meant to be imported, and you definitely don鈥檛 need this post explaining how to import them in your Golang based project. A simple go get ... should do the trick. But, what about the packages that are not meant to be imported? Or the ones that cannot be imported because of 鈥渢echnical reasons鈥 ? Could you simply add them to your import statements in the ....

May 30, 2021 路 5 min 路 Suraj Deshmukh

How to generate a self-signed TLS certificate for Kubernetes Admission Webhook Servers?

UPDATE: There is a way to generate these certificates automatically. To find out how, read this post. If you are writing a webhook server for Kubernetes Admission Controllers like ValidatingAdmissionWebhooks or MutatingAdmissionWebhooks, you must expose it over HTTPS. To run these servers on HTTPS, you need TLS certificates. There are solutions available which you can use to solve this problem, first and foremost that comes to my mind is cert-manager....

May 21, 2021 路 2 min 路 Suraj Deshmukh

Learnings from 'The Psychology of Money'

Synopsis of the Book The Psychology of Money, written by Morgan Housel, published in 2020, could be categorised under Psychology, Finance, and Nonfiction. The author wrote an article three years ago which got a lot of traffic hence decided to write a book out of it. Last year I saw that the book was recommended by many folks in my network and on Twitter. All of the recommenders were highly impressed by the book and spoke intensely of it....

May 20, 2021 路 4 min 路 Suraj Deshmukh

Mitigation of: Access Any Kubernetes Secret

In the previous blog, we discussed how any user without RBAC access to a Kubernetes secret can use a trick to access that secret. To mitigate that problem, we will use a validating admission webhook. But before looking at what sorcery this validating admission webhook server is, let us understand how Kubernetes handles the API requests. What are admission controllers? All requests going to the Kubernetes API server go through the following four steps:...

May 20, 2021 路 4 min 路 Suraj Deshmukh