2. @slintes#Devoxx #Kubernetes
Who am I?
• Software Engineer @
Luminis Technologies
• Java, Go,Angular2
• Working on
• Amdatu
• INAETICS
• CloudRTI
3. @slintes#Devoxx #Kubernetes
Kubernetes
• Greek for "helmsman" or
“pilot"
• schedules, runs and
manages containers in a
cluster of virtual or physical
machines
• declarative approach:
• try permanently to reach
the declared cluster state
4. @slintes#Devoxx #Kubernetes
Kubernetes
• started by Google in 2014
• based on over 10 years
experience (“Borg”)
• first release in Juli 2015
• donated to Cloud Native
Computing Foundation
• 100% Open Source
• Go
5. @slintes#Devoxx #Kubernetes
#1 Pods
• smallest deployable unit
• small group of tightly
coupled containers
• shared network and data
volumes
• routable IP address
• mortal!
7. @slintes#Devoxx #Kubernetes
#3 Deployments
• contains declaration of your application
• which containers (image / tag)
• environment variables
• data volumes
• defines number of replicas
• creates ReplicaSets, which in turn create Pods
9. @slintes#Devoxx #Kubernetes
#4 Services
• pods are mortal!
• services provide a
permanent virtual IP and
DNS name
• proxy traffic to selected
pods
• simple load balancing
including session affinity
11. @slintes#Devoxx #Kubernetes
#6 Namespaces
• Namespaces group kubernetes resources (pods, replicasets,
deployments, …)
• by default everything is in the “default” namespace
• create namespaces for your environments (e.g. test, staging,
production) and / or tenants
• restrict access to specific namespaces for k8s users
• namespaces can have separated networks (depends on
network provider)
12. @slintes#Devoxx #Kubernetes
#7 Clusters
• a cluster is a set of virtual or physical machines (nodes),
running a k8s master and one or more k8s worker nodes
• cluster federation:
• run a federation master, which knows all your clusters
• run your apps distributed across clusters, e.g. across Amazon /
Google / … regions
13. @slintes#Devoxx #Kubernetes
#8 Secrets and ConfigMaps
• separate your application code (= images) and configuration
• both Secrets and ConfigMaps are key-value-pairs
• use Secrets for binary values (e.g. certificates, keys)
• use ConfigMaps for string values
• both can be read by the container via environment variables
or mapped into a data volume e.g. like property files
14. @slintes#Devoxx #Kubernetes
#9 Data Volumes
• map directories into containers
• multiple containers in one pod share the same volumes
• many volume types:
• empty directory, host directory, Google Persistent Disk,Amazon
Blob Store, NFS, glusterfs, rdb, cephs, git repository, …
• can be preconfigured by cluster admins for easier usage by
cluster users
15. @slintes#Devoxx #Kubernetes
#10 PetSets
• a Pet is a stateful pod
• a PetSet has a scalable number of Pets
• a Pet is bound to a dynamically created data volume
• that data volume will never be deleted automatically
• the Pet is bound to the same volume on a restart
16. @slintes#Devoxx #Kubernetes
#11 Jobs
• sometimes you need to run short living tasks
• a Job ensures that a container which executes such a task
runs successfully exactly once (ore more times)
• retry on failure
• ScheduledJobs can be started at specific times (like cron)
18. @slintes#Devoxx #Kubernetes
#13 Autoscaling
• Horizontal Pod Autoscaling
• scales ReplicaSets based on
pod’s CPU usage or app-
provided metrics
• Cluster Autoscaling
• scale the number of nodes
in your cluster based on
CPU and memory usage
• depends on cloud provider
19. @slintes#Devoxx #Kubernetes
#14 API
• every functionality is provided via a REST API
• easy integration in your existing workflows (continuous
delivery)
• command line tool “kubectl” (uses the REST API internally)
20. @slintes#Devoxx #Kubernetes
#15 Community!
• constantly growing community
• active on Stackoverflow, Google Groups and Slack
• many contributors from many companies
• KubeCon conference