Skip to main content

Docker, Kubernetes and Helm

Docker

Docker in general

Docker is used to create, deploy and run applications (such as the Identity server en WebMVC) as containers.

Docker Images

Docker images is like a read-only snapshot of an image and they are used to create these containers. Each service in V9 will have their own image (Account.API, WebMVC, etc).

Okay so now that you have your containers that were created from the images, its gets a little bit more complicated when you are working with a bigger applications that have 10 to 10000 containers that should run and also where some containers will have three copied running simultaneously.... that is where an orchestrator comes in...

Kubernetes

Kubernetes is the most popular orchestrator (made by Google). Kubernetes (k8s) is in charge of orchestrating all of your containers. For example, if you indicate that the WebMVC should have 3 containers running, Kubernetes makes sure that there are always 3 running. If one of them fails for some reason, a new one should be started. Kubernetes also makes sure that you don't have to worry about the container IP addressees when communicating with one of them. Because there is 3 containers, there are also 3 different IP addresses. And because one of these containers can fail and a new one has to be started, it means that the new container will have a new IP address. So you can see why things can get quickly insane... however, Kubernetes also handles the networking. He makes sure that you can communicate with ONE IP or DNS and reach one of the 3 containers (preferably not one that is busy failing) via some sort of scheme such as round robin, load balancing, etc.

Pods

So Kubernetes works with resources and everything is just seen as a resource. The smallest resource of an application is called a Pod. 

 

 

Die Pod kan gesien word as die "rekenaar" waarop die application run. 'n Pod run dan 'n container. Hy kan meer as een container ook run. Hierdie praktyk word gewoonlik gebruik vir logging of proxying, waar jy 'n logger application saam met jou main application run in dieselfde pod (op dieselfde "rekenaar"). Daai logger application word dan 'n "sidecar" genoem.

Gewoonlik run ons maar net een container in een pod. Maar as jy 3x van jou application wil deploy, dan sal hy 3x Pods maak.