Kubernetes Demystified

Kubernetes Demystified

“When you look into it, Kubernetes isn’t that complicated after all”

Cba56198463ece8d5c1cc1d6a353ddbd?s=128

Wojtek Siudzinski

May 15, 2018
Tweet

Transcript

  1. “WHEN YOU LOOK INTO IT, KUBERNETES ISN’T THAT COMPLICATED AFTER

    ALL” WYLIIKITCAA
  2. WHAT IS KUBERNETES? CLUSTER STATE STORE (AND MANAGER)

  3. WHAT IS KUBERNETES? DESIRED STATE CLUSTER

  4. WHAT IS KUBERNETES? “I NEED A CONTAINER RUNNING NGINX” Pick

    feasible nodes Update their desired state Get the current state
  5. WHAT IS KUBERNETES? “I NEED A CONTAINER RUNNING NGINX” Pick

    feasible nodes Update their desired state Get the current state
  6. HOW DO I SET THE DESIRED STATE? apiVersion: v1 kind:

    Pod metadata: name: nginx spec: containers: - name: nginx image: nginx:1.7.9 ports: - containerPort: 80
  7. HOW DO I SET THE DESIRED STATE? $ kubectl create

    -f pod-nginx.yaml
  8. WHAT IS KUBERNETES? “I NEED A CONTAINER RUNNING NGINX” Pick

    feasible nodes Update their desired state Get the current state
  9. HOW DOES KUBERNETES SELECT THE FEASIBLE NODES? CONTROLLERS

  10. DEPLOYMENT STATEFUL SET DAEMON SET WORKLOAD CONTROLLERS

  11. DEPLOYMENT Declarative updates Rolling back Scaling Creates ReplicaSets WORKLOAD CONTROLLERS

  12. STATEFUL SET Guaranteed order and uniqueness Persistant storage Stable, unique

    network identifiers WORKLOAD CONTROLLERS
  13. DAEMON SET Running on all nodes WORKLOAD CONTROLLERS

  14. LABELS

  15. AFFINITY TAINT Node selectors Required/preferred Conditions Eviction TAINT AND AFFINITY

  16. WHAT IS KUBERNETES? “I NEED A CONTAINER RUNNING NGINX” Pick

    feasible nodes Update their desired state Get the current state
  17. THE DESIRED STATE

  18. ETCD Distributed key/value store Like a directory tree (/etc) JSON/REST

    API Uses a Discovery URL Needs at least 3 nodes for consensus
  19. WHAT IS KUBERNETES? “I NEED A CONTAINER RUNNING NGINX” Pick

    feasible nodes Update their desired state Get the current state
  20. KUBELET

  21. None
  22. WHAT IS KUBERNETES? “I NEED A CONTAINER RUNNING NGINX” Pick

    feasible nodes Update their desired state Get the current state
  23. None