K8s
Greek for "governor"
## What ? * Container orchestration
## Facts * Current version 1.12 (09/2018) * Apache License 2.0 * Maintained by CNCF (Cloud native computing foundation) * Implemented in Go
## History * First release in 2015 * Developed by Google * influenced by Google's Borg system
## Competitive products * Docker swarm mode
## What you need * Lots of time for RTFM * Linux nodes * K8s distribution * (Internet)
## Types of distributions * Hosted Solutions * Turnkey cloud solutions * On-Premises turnkey cloud solutions * Custom cloud solutions * Custom On-Premise cloud solutions * Local machine solutions
## Architecture * K8s master nodes * dedicated nodes * etcd (distributed KV store): K8s configuration * API server: REST API * scheduler * controller manager * K8s slave nodes * container runtime (docker, rkt, ...) * kubelet: daemon for starting/stopping containers * cadvisor: resource monitoring of containers * kube-proxy: proxy + load balancer to access containers * + pods
## Key concepts * pod * service * deployment * labels and selectors
## pod * smallest deployment unit * running on one node * set of resources that are meant to be scheduled together * one or more containers and volumes * one unique IP address per POD
## service * set of pods working together * stable IP address and DNS name * service discovery * load balancing * expose service internally or externally
## deployment * place where containers, volumes, secrets and configurations are defined * define the number of replicas * replication & placement strategies
## labels and selectors * key value pair * can be attached to any API object (pod, service) * "label selectors" are queries against labels that resolve to matching objects ``` tier=back-end AND release_track=canary ```
## Further key elements * Volumes * Replica sets * Stateful sets * Daemon sets * Cron jobs * Jobs
## Features * auto-scaling * service discovery (DNS, env vars) * persistence * health checks * rolling updates
## Commands * kubectl: the command line util to talk to your cluster * kubeadm: the command to bootstrap the cluster * minikube: CLI app for setup of a local cluster
## Helm * Package manager for K8s * packaging format: `charts` * describes deployment of a simple or complex application stack * yaml files * packaged and versioned * like docker compose file
## Example * Vagrant environment * Ubuntu * Minikube * Dashboard: http://localhost:30000 * https://github.com/cgoeller/kubernetes-slides/examples
## Pros * large community * production ready ## Cons * complexity
# The end. https://kubernetes.io https://github.com/cgoeller/kubernetes-slides