A Few Notes on Etcd Maintenance

This was originally published under Gojek’s engineering blog by me, this post is a repost. If you have worked around managing Kubernetes clusters on your infrastructure — instead of going with a managed version provided by cloud providers — chances are that you already are managing an etcd cluster. In case you are new to it, this post is for you. We’ll get the basics out of the way first, and define what Etcd is. ...

April 24, 2020 · 7 min · Tasdik Rahman

Introducing Kingsly — The Cert Manager

This was originally published under Gojek’s engineering blog by me, this post is a repost. There’s one thing all devices connected to the Internet have in common — they rely on protocols called SSL/TLS to protect information in transit. SSL/TLS are cryptographic protocols designed to provide secure communication over insecure infrastructure. Any communication over the public internet should be encrypted, for which we need SSL certificates. There are many cases for public communication in GOJEK as well. Some of them are listed below: ...

April 22, 2020 · 7 min · Tasdik Rahman

Route missing in kubernetes node with kuberouter as the CNI

Anyone who is evaluating into having a networking solution for their kubernetes cluster without having a lot of moving parts in the cluster, kuberouter provides pod networking, ability to enforce network policies, IPVS/LVS service proxy among other things. The problem which we faced specifically while running this in our clusters was missing routes upon restart of the node, or sometimes in the case when the node was joining the cluster as part of the worker node. ...

January 5, 2020 · 2 min · Tasdik Rahman

Various ways of enabling canary deployments in kubernetes

Update I gave a quick lightening talk about the same talk @ DevopsDays India, 2019. The slides for which can be found below What canary can be Shaping the traffic in a way, so that we could direct a % of traffic to the new pods and promoting the same deployment to a full scaleout and gradually phasing out the older release. Why canary? Testing on staging doesn’t weed out all the possible reasons for something failing, final testing for a feature being done on some part of the traffic is not something unheard of. Canary being a precursor to enable full blue green deployments. ...

September 12, 2019 · 4 min · Tasdik Rahman

Handling signals for applications running in kubernetes

When the power goes off in a device in a linux based system, one can think of ways in which this event can be handled in the applications running on it. One thing to note is that, when you plug the power cable off, the power doesn’t really go off immediately. But this needs to be notified to processes so that they can handle such an event and save the state of the application (if any). ...

April 24, 2019 · 6 min · Tasdik Rahman

Container Image Structuring for container runtimes

While you might have read posts about docker being dead, but given its adoption. That’s not really the case. While we have other container runtimes like runc, containerd, rkt and some others. Docker is still something which a lot of folks running containers use as their container runtime. What this post will describe is one of the many approaches of structuring your container images, keeping in mind reusability, security and best practices in mind and keeping them as lightweight as possible. At the time of writing this, this is something which is still used to run production container workloads in my last company. ...

April 10, 2019 · 6 min · Tasdik Rahman

Self hosting kubernetes

kubernetes has been around for some time now. At the time of writing this article, v1.14.0 is the latest release and with each new release, they have a bunch of new features. This post is about the initial setup for getting the kubernetes cluster up and running and assumes that you are already familiar with what kubernetes is and a rough idea on what the control plane components are and what do they do. I gave a talk on the same subject of self-hosting kubernetes in DevOpsDays India, 2018 ...

April 4, 2019 · 7 min · Tasdik Rahman

Solo Backpacking trip to Hampi, Gokarna and Goa

It was a cold Friday night, had just come back home after wrapping up the farewell party which was thrown by my colleagues from my last company. I was feeling worn out of all the activities from the day, but I kept reminding myself that I had to start packing for the impromptu solo backpacking trip which I had planned before I joined my next gig in the coming 10 days. ...

March 22, 2019 · 20 min · Tasdik Rahman

Object Comparison

When do you say two objects are equal? Taking example of the below two and having ruby as the language, Comparing primitive objects irb(main):001:0> 1 == 1 => true irb(main):002:0> 'tasdik' == 'tasdik' => true irb(main):003:0> Comparing custom objects But what if you are having a custom class defined which has attributes for itself, you can’t really compare them using == default. For example. irb(main):001:0> module Money irb(main):002:1> class Wallet irb(main):003:2> attr_accessor :rupee, :paise irb(main):004:2> irb(main):005:2> def initialize(rupee: 0, paise: 0) irb(main):006:3> @rupee = rupee irb(main):007:3> @paise = paise irb(main):008:3> end irb(main):009:2> end irb(main):010:1> end => :initialize irb(main):011:0> irb(main):012:0> office_wallet = Money::Wallet.new => #<Money::Wallet:0x00007fb4328889c8 @rupee=0, @paise=0> irb(main):013:0> personal_wallet = Money::Wallet.new => #<Money::Wallet:0x00007fb430991290 @rupee=0, @paise=0> irb(main):014:0> irb(main):015:0> office_wallet == personal_wallet => false irb(main):016:0> But as we can see that the two objects have the same attributes, which would be rupee and paise having the same values. They should, logically be the same thing and they should have returned true as a result of the == comparison ...

March 21, 2019 · 5 min · Tasdik Rahman

F.I.R.S.T principles of testing

First principles of testing stand for Fast Isolated/Independent Repeatable Self-validating thorough Bugs are introduced in the parts of code, which we usually don’t pay attention to, or places which are too hard to understand. Fast The developer shouldn’t hesitate to run the run the unit tests at any point of their development cycle, even if there are thousands of unit tests. They should run and show you the desired output in a matter of seconds ...

March 13, 2019 · 2 min · Tasdik Rahman