Suraj Deshmukh


containers, packaging, programming, hacks, kubernetes, openshift, fedora, centos

How to gracefully kill Kubernetes Jobs with a sidecar?

A sidecar in a Kubernetes Job, what? Yeah you might need one and here is how to shut it.

Suraj Deshmukh

6-Minute Read

Have you ever had a sidecar in your Kubernetes Job? If no, then trust me that you are lucky. If yes, then you will have the frustration of your life. The thing is Kubernetes Jobs are meant to exit on completion. But if you have a long-running sidecar, then that might twist things for Kubernetes and in turn of you.

Use Configmap for Scripts

A new way to ship scripts to container images.

Suraj Deshmukh

6-Minute Read

We generally use some sort of scripts in application container images. They serve various purposes. Some scripts might do an initial setup before the application starts, others may have the whole logic of the container image, etc. Whatever the goal may be the general pattern is to copy the script into the container image, build the image and then the script is available when you consume the image.

Being Productive with Git

Tips and tricks to make your day to day usage easier.

Suraj Deshmukh

5-Minute Read

Git is a day to day tool for version control. It has become a de facto method of source code versioning, it has become ubiquitous with development and its an essential skill for a programmer. I use it all the time.

How to backup and restore Prometheus?

Backing up Prometheus??!!

Suraj Deshmukh

2-Minute Read

This blog will show you how to take a backup from a running Prometheus and restore it in some other Prometheus instance. You might ask why would you even want to do something like that? Well, sometimes you want the Prometheus metrics because they were collected for some particular purpose and you want to do some analysis later.

Cobra and Persistentflags gotchas

How wrong usage of persistent flags can burn you

Suraj Deshmukh

3-Minute Read

If you are using cobra cmd line library for golang applications and it’s PersistentFlags and if you have a use case where you are adding same kind of flag in multiple places. You might burn your fingers in that case, if you keep adding it in multiple sub-commands without giving it a second thought. To understand what is really happening and why it is happening follow along.

Golang struct tags gotchas

Struct tags can give you problems you didn't see coming ;-)

Suraj Deshmukh

1-Minute Read

In golang while using struct tag, the spaces make a lot of difference. For example look at the following code.

Recent Posts



I am a Software Engineer at Kinvolk, working on various tooling around container technology like Docker, Kubernetes.