Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Kubernetes talk at DDDSydney 2017

804 views

Published on

My presentation in DDDSydney 2017 titled "Avoiding death by a thousand containers. Kubernetes to the rescue!"

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Kubernetes talk at DDDSydney 2017

  1. 1. 2 / HESHAM AMIN http://heshamamin.com/ @heshamamin https://plus.google.com/+HeshamAmin https://www.linkedin.com/in/heshamaamin/
  2. 2.  Docker container = Process  Not a complete application (Usually) 3
  3. 3.  Maintaining a desired number of running containers  Service discovery  Load Balancing  Scaling  Rolling updates  Rollback  Management  Resource optimization 4
  4. 4. Swarm Kubernetes
  5. 5.  Open source (Go)  Started by Google  Supported on GKE, Azure Container Service  …But can run on others (AWS / On-premises)  Local development (Minikube) 6
  6. 6. 7
  7. 7. Node Master(s) API Proxy Node Node Kubelet Elastic Load Balancing Amazon VPC
  8. 8. Virtual or Physical machines Worker Node is a machine that hosts the containers Master node control workers 10
  9. 9.  The smallest logical unit of deployment  Collection of containers  Usually one  Share IP and port space (localhost)  Not durable 11
  10. 10. 12 apiVersion: v1 kind: Pod metadata: name: pod-example labels: env: test spec: containers: - image: nginx name: nginx
  11. 11.  Abstraction which defines a logical set of Pods and a policy by which to access them.  Internal and external access  This set of Pods are determined using selectors. 13
  12. 12. 14 kind: Service apiVersion: v1 metadata: # Unique key of the Service instance name: service-example spec: ports: # Accept traffic sent to port 80 - name: http port: 80 targetPort: 80 selector: # Loadbalance traffic across Pods matching # this label selector app: nginx # Create an HA proxy in the cloud provider # with an External IP address - *Only supported # by some cloud providers* type: LoadBalancer
  13. 13.  Declarative desired state of Replica Sets  Support scaling and autoscaling  Can be rolled-back 15
  14. 14. 16 apiVersion: extensions/v1beta1 kind: Deployment metadata: # Unique key of the Deployment instance name: deployment-example spec: # 3 Pods should exist at all times. replicas: 3 # Keep record of 2 revisions for rollback revisionHistoryLimit: 2 template: metadata: labels: # Apply this label to pods and default # the Deployment label selector to this value app: nginx spec: containers: -name: nginx # Run this image image: nginx:1.10
  15. 15.  Ensure a specified number of Pods is running at any time  Used for scaling 17
  16. 16.  Group of Stateful Pods.  Stable, unique network identifiers.  Stable, persistent storage. 18
  17. 17.  Scope for names. Names of resources are unique within a namespace.  A way for managing resource quotas:  Number of objects  Memory  CPU Cores  Used for large clusters. 19
  18. 18. 21 / HESHAM AMIN http://heshamamin.com/ @heshamamin https://plus.google.com/+HeshamAmin https://www.linkedin.com/in/heshamaamin/

×