Kubernetes Containers a Boon for Developers

What is Kubernates and why do we care about it? It starts with containers, says Hossam Barakat (@hossambarakat_).

We used to run multiple applications directly on the host server. Then we started using virtual machines for isolation. Containers allow us to further isolate the application and its dependencies on the host server(s).

 

 

Containers illustration from Hossam Barakat’s “Kubernetes for Developers” presentation.

We can run more containers on the same host with less overhead from the guest OS that comes with virtual machines.

Scaling With Growth

Kubernetes helps to automate deploying, scaling, and managing many containers. It’s not needed for a few containers. But it’s the most popular container orchestration system. Kubernetes is architected as shown in this diagram.

 

 

Kubernetes architecture from Hossam Barakat’s “Kubernetes for Developers” presentation.

Kubernetes Components

As you can see, Kubernetes is made up of several components.

Pods

An application lives in a pod. To scale an application, we simply scale the pod. Pods are declared using a YAML doc and deployed using the CLI command: kubectl.

 

 

 

Pod example from Hossam Barakat’s “Kubernetes for Developers” presentation.

This pod definition is relatively simple. It contains a single container definition. The entire application can consist of several container definitions with more complex parameters than what you see here.

ReplicaSets

Pods are contained within replica sets for stability. If a pod is unhealthy, other pods in the replica set keep the application alive. Replica sets are also declared using YAML. A deployed replica set looks like the following:

 

Representation of the Kubernetes dashboard from Hossam Barakat’s “Kubernetes for Developers” presentation.

Kubernetes assures that there will be three pods in the replica set shown above. You can easily scale the replica set up and down by changing the desired number of (Read more...)

*** This is a Security Bloggers Network syndicated blog from Sonatype Blog authored by Phil Vuollet. Read the original post at: https://blog.sonatype.com/kubernetes-for-developers