Presentation by Alex Mavrogiannis from Docker Inc, during the Docker Athens Meetup, January 4th 2018, on the integration of Docker Swarm and Kubernetes as orchestrators of the Docker platform.
4. What are Docker containers?
Processes running on the same host OS using the following mechanisms:
โ IPC Namespaces
โ PID Namespaces
โ Network Namespaces
โ Control Groups (Memory/CPU)
โ Union Filesystems and image distribution mechanisms
Containers are managed by the Container Runtime process running on the host OS, the Docker Engine.
5. What is a container orchestrator?
Management of containers running in one or more container runtimes
6. Orchestrator: Docker Swarm
โ github.com/docker/swarm
โ Cluster-wide imperative API based on the single-node API of the Docker Engine
โ High Availability and peer discovery managed through a pluggable discovery backend:
etcd, consul
โ โLeaderโ caches entire cluster state: containers, volumes, networks etc.
7. Orchestrator: Docker Engine with Swarm-Mode Enabled
โ github.com/docker/swarmkit
โ Declarative State through the โServiceโ construct
โ Built-in Routing Mesh & Overlay networking
โ In-memory Raft Store for all state (persisted to disk)
โ Built-in CA, per-node cryptographic node identity, mTLS between all endpoints
13. Linuxkit VM
Kubernetes CLI
Swarm Mode Kubernetes
etcd
Docker CLI
kubeadm
Kubernetes in Docker CE (Windows and Mac)
Compose
CRD
Single Docker Engine
vpnkitHost fs mounts hyperkit / hyperv
14. Docker EE to include Kubernetes
Private Image Registry
Secure Access and User
Management
App and Cluster Management
Image Security Scanning Content Trust and Verification
Policy Management
15. GUI
Universal Control Plane
Trusted Registry Kubernetes CLI
Docker Engine
Swarm-Mode
Docker Swarm Kubernetes
etcd
CA OIDC Provider
Docker CLI
Node Agent Reconciler
Kubernetes in Docker EE
16. Docker EE Architectural Highlights
โ Conformant Kubernetes components ran as Docker containers
โ Swarm Managers are Kubernetes Masters
โ Swarmkit node inventory is source of truth
โ Cryptographic Node Identity and mTLS used throughout
17. Kubernetes Plugin Interfaces in Docker EE
โ General:
โ Native API extensibility supported
โ Some apiserver/kubelet flags modifiable by users
โ Networking:
โ Support for CNI plugin during install
โ Ingress
โ Storage: Docker Volume Plugins supported via built-in flexvolume driver, CSI in future
โ Metrics: Heapster Storage Backends or Prometheus
19. Resource Contention
โ Allocatable Resources: The set of CPU and Memory resources available for scheduling by
an orchestrator on a single node
โ Multiple orchestrators = Different definitions of allocatable resources
โ Docker Swarm: Respectful of CPU/Memory limits, but container cache may be stale
โ Docker Engine with Swarm-Mode: Only aware of its own reservations
โ Kubernetes: Effective handling of out-of-resource situations, but only for kubernetes
workloads
โ When a node is at/near capacity:
โ All CPU shares throttled equally
โ The OSโs OOM killer kills processes
โ All orchestrators will reschedule on OOM, but potential workload interruption
20. Orchestrator Selection
โ Each node is running both kubernetes and swarm system components
โ Administrators can toggle between (kubernetes, swarm or mixed) scheduling for any given
node.
โ When toggling orchestrators, workloads of the previous orchestrator will be evicted
โ If a node is not enabled for a given orchestrator, users will not be able to schedule
workloads on that node using that orchestrator.
Manager Node
(K8s, Swarm)
Worker Node
(Swarm)
Worker Node
(Kubernetes)
Worker Node
(Kubernetes)
Kubelet
Swarm Agents
Kubelet Kubelet Kubelet
Swarm Agents Swarm Agents Swarm Agents
21. Workload Interoperability
โ Networking
โ Layer 3 not connected between kubernetes & swarm
โ Batteries-included kubernetes ingress controller
โ Layer 7 routing for swarm workloads
โ Configure external DNS
โ Storage: Kubernetes workloads with docker volumes via flexvolume
23. Identity Providers
Systems that manage identity information for principals and provides user authentication as a
service.
โ SAML
โ OpenID Connect (OIDC)
24. Actors in Docker EE Authentication/Authorization
โ Client (Browser, Docker CLI or kubectl)
โ UCP Controller
โ OIDC Provider
โ Kubernetes API server
26. In Summary...
โ Docker EE and CE will include a conformant
Kubernetes distribution.
โ Resource Contention mitigated via orchestrator
selection
โ In EE, Authentication and Authorization integrated
via standard plugin interfaces.