Setup Databases like PostgreSQL inside Kubernetes cluster

Kubernetes is getting a lot of traction in the world of DevOps for hosting stateless microservices. But what about Stateful applications like Databases? It’s been a topic of debate when it comes to hosting databases on Kubernetes or even docker for production environments. Thankfully Kubernetes does have a special resource that can be used for setting applications like Databases. I am talking about Statefulsets.

StatefulSets are like deployment resources but they are special in the sense that Kubernetes maintains a persistent identifier for the pods and hence these pods are not interchangeable. This helps when running stateful applications.

To learn more about this, we will set up a Postgres database inside Kubernetes. Although we are using Postgres the concepts and steps are the same for any databases like MySQL, etc.

Read More

Nginx Ingress setup for kubernetes

Recently I decided to give Kubernetes a try. I was avoiding it just for the reason of writing several long YAML files. I know I am a lazy guy. But once you get used to writing Kubernetes code, you discover the power of it. You do have to write a docker-compose file in the world of Docker but I have found writing YAML for Kubernetes more tedious but it might be worth it once you understand what more you can do with Kubernetes.

Like everyone the first thing I learned in Kubernetes is to create a deployment that serves a website and created a service around it. The first question that came in my mind afterward is how I can host 2 websites and route the traffic to them based on hostnames. Traditionally you would install something like NGINX and configure it to serve different websites or forward the requests to some other service. We can still use Nginx to route our request in Kubernetes but in a different way, by using Ingress.

Read More

Setting up Geth, Mist & TestRPC - Part 1 - Getting Started with Smart Contracts & Blockchain

Once you have acquired yourself with basic knowledge of Blockchain, it’s time to move on towards actually using it. We are going to use Ethereum for understanding how to create and use Smart contracts. Like any environment, Ethereum also comes with its own tools. Mist and Geth are the two most important tools that you must be comfortable with. Let’s check them out.

Read More

Getting Started with Smart Contracts & Blockchain - Part 0 Understanding Basics

There are really low chances that you haven’t heard about Bitcoin. There have been numerous stories of people getting higher returns after they invested in it. Then there are people talking about how Bitcoin is revolutionizing financial domain. Some even worship Bitcoin and want to throw away Banks and Governments :P

I always thought Bitcoin just as a cryptocurrency, but never realized the power of underlying technology: Blockchain. Bitcoin became famous for using Blockchain. It’s this Blockchain that makes Bitcoin decentralized, secure and immutable. So what is a blockchain? Let’s find out.

Read More