joubin's Kardz

Docker swarm mode

Swarm mode refers to cluster management and orchestration features embedded in Docker Engine. When you initialize a new swarm (cluster) or join nodes to a swarm, the Docker Engine runs in swarm mode.

Shared by joubin on Fri Jan 12 2018

Kubernetes vs Docker Swarm

Kubernetes is a full-fledged container orchestration system that includes a scheduler, health checks, rolling upgrades, autoscaling, etc. whereas Docker Swarm is mainly about providing a cluster-wide view of a single Docker engine.

Shared by joubin on Fri Jan 12 2018

Compiler parts

Every Compiler has two parts:

1. Front end (lexical analysis, parsing)

1.5 Optimizer (Optimizing abstract syntax tree)

2. Back end (machine code generation)

Front end (e.g. Clang) takes the source code and generates abstract syntax tree (LLVM IR).

Optimizer takes the LLVM IR and generates more optimized code using dead code elimination, constant propagation and other techniques ( Optimizing compiler ).

The back end takes optimzed IR and generates machine code specific to CPU ( X86, PowerPC, ARM ).

Shared by joubin on Tue Mar 06 2018

Blue-Green Deployment

The Blue-Green Deployment is a technique for releasing your application in a predictable manner with the goal of reducing any downtime associated with a release.

The point is that at any given time, only one version of the application is serving client.

Contrast this with rolling-updates type of deployment.

It’s a quick way to prime your app before releasing, and also quickly roll back if you find issues.

Shared by joubin on Sat Feb 03 2018

Kubernetes (K8s)

Kubernetes is an open-source platform for automating deployment, scaling, and operations of application containers across clusters of hosts, providing container-centric infrastructure.

Shared by joubin on Tue Feb 21 2017


GlusterFS as a persistent data store for Kubernetes container applications.

It's an open-source software-based network-attached filesystem that deploys on commodity hardware.

After RedHat acquired the company, it was first marketed as Red Hat Storage Server, but in early 2015 renamed to be Red Hat Gluster Storage

Shared by joubin on Sat Jan 13 2018

Docker Containers

Containers are simply a collection of "development code + depenencies". This is the same as saying that containers are a collection of "executable application + the dependencies".

A container runs on top of a container-runtime.

The container-runtime runs on top of the Kernel/OS/Hardware.

Contrast this with Hypervising setup.

Shared by joubin on Sat Jan 27 2018

Kubernetes etcd

etcd is a consistent and highly-available key value store used as Kubernetes' backing store for all cluster data.

etcd is a persistent, lightweight, distributed, key-value data store developed by CoreOS that reliably stores the configuration data of the cluster, representing the overall state of the cluster at any given point of time.

Other components watch for changes to this store to bring themselves into the desired state.

Shared by joubin on Sat Feb 03 2018


boot2docker is a lightweight Linux distribution based on Tiny Core Linux made specifically to run Docker containers.

It runs completely from RAM, ~27MB in size and boots in ~5s (YMMV).

Shared by joubin on Sun Mar 04 2018


The General Data Protection Regulation (GDPR) (Regulation (EU) 2016/679) is a regulation by which the European Parliament, the Council of the European Union, and the European Commission intend to strengthen and unify data protectionfor all individuals within the European Union (EU).

It also addresses the export of personal data outside the EU.

GDPR regulates how we can process personal data.

Shared by joubin on Mon Mar 05 2018


Minikube uses localkube for running the cluster.

localkube was originally written and donated to this project by RedSpread.

Minikube uses libmachine for provisioning VMs.

Shared by joubin on Sun Mar 04 2018

Kubernetes Services

A Kubernetes Service is an abstraction which defines a logical set of Pods and a policy by which to access them - sometimes called a micro-service.

The set of Pods targeted by a Service is (usually) determined by a Label Selector.

Kubernetes Services are needed due to the ReplicationController createing/scaling up various Pods and assigning them their IP Address.

Shared by joubin on Sun Mar 04 2018

Kubernetes Pods

Kubernetes Pods are mortal.

ReplicationControllers create and destroy Pods dynamically (e.g. when scaling up or down or when doing rolling updates).

Each Pod gets its own IP address on each create.

Shared by joubin on Sun Mar 04 2018

Protected B

Protected B (Particularly Sensitive protected information): is used to protect information that could cause severe injury or damage to the people or group involved if it was released. Examples include medical records, annual personnel performance reviews, income tax returns, etc.

Shared by joubin on Fri Mar 02 2018

What are Containers?

A docker container is an isolated, resource controlled and portable operating environment.

Operating Environment = ON

A container provides an environment where an application can run without affecting the rest of the system and without the system affecting the application.

Shared by joubin on Tue Feb 27 2018

Status of a Pod in K8s

# Gets the status of a Pod in K8s
kubectl get pod <name>

Shared by joubin on Wed Feb 28 2018

Shelling into a Pod

# Shelling into a pod
kubectl exec -it <pod-name> -- /bin/bash

Shared by joubin on Wed Feb 28 2018

Get the environment variables of a Container

# to get the environment variables of a container
kubectl exec <pod> env
kubectl exec <pod> --container <container-name> env

Shared by joubin on Wed Feb 28 2018

Containers vs. Virtual Machines

Shared by joubin on Tue Feb 27 2018

Kubernetes Virtual Clusters

Virtual clusters are called namespaces.

Kubernetes supports multiple virtual clusters backed by the same physical cluster.

Namespaces are a way to divide cluster resources between multiple users.

Shared by joubin on Mon Feb 19 2018