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. 

 

The

 

pod

Diecan Podbe kan gesien wordseen as diethe "rekenaar"computer waaropthat diethe application run. 'n Podis run danon 'nand the pod is then running a container. HyThe kanpod meercan asalso eenrun more than one container ookat run.a Hierdietime. praktykThis wordpractice gewoonlikis gebruikusually virused for logging ofor proxying,proxying waarwhere jyyou 'nrun a logger application saamwith met jouyour main application run in dieselfdethe same pod (opon dieselfdethe "rekenaar")same computer). DaaiThis logger application wordis dancalled 'na "sidecar"sidecar genoem.

Usually,

Gewoonlikwe only run ons maar net eenone container in eenone pod.pod Maarbut asif jyyou 3xwant vanto jou3 applicationinstances wilof deploy,your danapplication, salthen hyit 3xwill Podscreate maak.three pods.