Join us here : https://goo.gl/CW8Syr
Node : Bare-metal machine or VM or Cloud instance.
Swarm : A cluster of nodes
Manager Nodes : Understand the desired configuration and give the job to the workers but could be a worker as well (bad practice)
Worker Nodes : These nodes collect and run tasks from manager nodes.
Service : Container (based on image) with metadata like replicas, networks and volumes.
def.
(Opinionated) Orchestration framework to organise and deploy container-based applications
Agnostic sandbox where you provide the desired state of your services/apps. Kubernetes aims to take care of everything else
Let's see how it works
etcd : Distributed database to store configuration
Kubelet : Monitor the pod activity (health check) . Stop /start and update the running pods.
Let's see how apps runs
Pods : A pod is a group of one or more containers (such as Docker containers), with shared storage/network, and a specification for how to run the containers. A pod’s contents are always co-located and co-scheduled, and run in a shared context.
Deployments : You describe a desired state in a Deployment object, and the Deployment controller changes the actual state to the desired state
Services : Network endpoints that can be reach by external service. The service will automatically round-robin requests between pods. Kubernetes embed a DNS server for the cluster that watches for new services (discovery service).
Labels : Key-value information to search and update the components.
Let's see how access/run it
kubectl is your local CLI command center.
You can issue commands to the cluster either by kubectl or directly calling REST APIs exposed by the master
Let's try it
Open source projects (Go Language)
Compatible with storage providers
Load balancing and DNS «out of the box»
Compatible with almost monitoring tools
Applications can be deployed into a pod which are the smallest component of Kubernetes.
A Service is the access point for the application.
A pod may have one or many containers inside
Application is detailed in a yaml file (docker-compose) with one or many containers
A service is generated from the declarative text and deployed into the cluster.
The scaling value is defined for the pod. Manually or automatic.
Set with replica command or in the deployment (Yaml file)
A service can be global : 1 task for every node within the cluster.
Or managed by replicas : 3 replicas on 1,2 or 3 nodes max.
Scaling manually !
Multiple pods can be distributed among nodes to provide HA.
Multiple master nodes and worker nodes can be load balanced for request.
Etcd is natively distributed
API server can be replicated
Swarm use Raft consensus (HA).
Mandatory : an odd number of manager.
Swarm uses the Ingress network to manage the services.
Pods are exposed through a service, which can be used as a load-balancer within the cluster. Typically, an ingress is used for load balancing.
Auto-scaling using a simple number-of-pods target is defined declaratively using deployments. CPU-utilization-per-pod target is available. Other targets are on the roadmap.
Swarm mode has a DNS component that can be used to distribute incoming requests to a service name. Services can run on ports specified by the user or can be assNot directly available. For each service, you can declare the number of tasks you want to run. When you manually scale up or down, the Swarm manager automatically adapts by adding or removing tasks.igned automatically.
Supports multiple modes for rolling update (number of pods offline, parallelism ..)
Rolling update are applied on services with many strategies (ex : delay between nodes)
Different health check (container , pod, node, cluster …)
K8s aggregates by default the logs
Only one health check (by service)
Many storage API
K8s supports different type of persistent volumes (iSCSI, NFS, S3 , GCP , Azure …)
The emptyDir volume is non-persistent and can used to read and write files with a container.
Compatible Docker volume (in container or docker-compose)
Swarm supports different type of persistent volumes (iSCSI, NFS, S3 , GCP , Azure …)
Text
Text
All components in a pod could communicate each other and each pod has an IP address.
The service is like a VIP with a load-balancer
Overlay network
Encrypted by default
Kubernetes scales to 5,000-node clusters.
API responsiveness: 99% of all API calls return in less than 1s.
Pod startup time: 99% of pods and their containers (with pre-pulled images) start within 5s.
Docker Swarm has been scaled and performance tested up to 30,000 containers and 1,000 nodes with 1 Swarm manager.
Google Borg
Red Hat
Autoscaling
Largest community
Rookie
Only Docker containers management
Services can be scaled manually.
Smaller community
Installation can be hard ! (except in Cloud services)
Included with docker engine
Easy to learn