3. 3
• The Basics
• Kubernetes for Ops
• Kubernetes for Devs
• How you can get started
Demystifying Kubernetes
for enterprise DevOps
4. 4
• Founder and CEO at Nirmata
• Developing large-scale distributed
systems since the early 90’s
(Go, Java, JS, C++)
• Centralized management for
complex systems
Jim Bugwadia
CKA-1700-0169-0100
6. 6
Kubernetes is an open-source system for
automating deployment, scaling, and
management of containerized applications.
7. 7
• Originally developed by Google, based on 15 years of
experience running production containerized
workloads.
Kubernetes
• Now governed by the CNCF
• Community-driven
• Robust, scalable, and
extensible
10. 10
Pods
• Pods are the basic unit of
deployment and management
• A Pod can contain multiple
containers
• All containers in a Pod have
the same network and storage
https://kubernetes.io/docs/concepts/workloads/pods/pod/
12. 12
Master nodes run Kubernetes components
• kube-apiserver
front-end for the Kubernetes control-plane
• etcd
datastore for the cluster
• kube-controller-manager
controllers for routine cluster tasks
• cloud-controller-manager
controllers specific to cloud providers
• kube-scheduler
assigns Pods to nodes
13. 13
Worker Nodes
• Kubelet
manages pods, executes liveness probes, reports pod and node status.
• kube-proxy
network proxy; performs connection forwarding
• docker / rkt / containerd
the container engine
• Add-ons
Dashboard, DNS, etc.
• Your application pods
14. 14
K8s networking follows 3 principles:
1. All containers can communicate with all other
containers without NAT
2. All nodes can communicate with all
containers (and vice-versa) without NAT
3. The IP that a container sees itself as is the
same IP that others see it as
Networking
15. 15
• Each pod gets its own IP address
• CNI (Container Network Interface) is the plugin
model used by the Kubelet to invoke the networking
implementation
• CNI plugins: Calico, Contiv, Flannel , GCE, …
Kubernetes Networking
16. 16
• Pods can contain one or more Volumes
Volume types: emptyDir, hostPath, persistentVolumeClaim, secret,
awsElasticBlockStore, AzureDiskVolume, …
• A PersistentVolumeClaim (PVC) requests a
PersistentVolume (PV) that can be dynamically provisioned.
• Admins can configure StorageClasses for PVCs,
like “bronze”, “silver”, or “gold”.
• A storage class is configured with a Provisioner,
like AzureDisk.
Storage
23. 23
Pods
• Contains
• One or more Containers
• One or more PVCs
• Other constructs
• nodeSelector
• affinity
• serviceAccountName
• secrets
• initContainers
Pod
Container
Secrets
Persistent
Volume Claim
24. 24
• Pods can be managed individually, but don’t do this!
• Pods lifecycles are best managed using one of:
• Deployments
• StatefulSets
• DaemonSets
• Less often used:
• ReplicaSets (Deployments manage ReplicaSets)
• Jobs (short-lived run-to-completion tasks)
Managing Pods
25. 25
• Deployments automatically create
(and delete) ReplicaSets
• Rollout: a new ReplicaSet is created and scaled up. The
existing ReplicaSet is scaled down.
• Rollback: only impacts the Pod template. Can rollback
to a specific revision ID.
• Rolling upgrade strategy tunables:
• maxUnavailable
• maxSurge
Deployments
Pod Template
Deployment
Replica Set
26. 26
• Pods with stable identities
• names, network, storage
• Ordered creation, updates, scaling, and deletion
• Pods are created, and named, in order from {0…N-1}
• Use for clustered apps that use client-side identities
• ZooKeeperAddresses: “zoo-1:2181, zoo-2:2181, zoo-3:2181”
Stateful Sets
27. 27
• Pods that need to run on all Nodes
i.e. “one per node”
• Useful for monitoring & security agents, log
daemons, etc.
• A node selector can be used to target a subset of
nodes
Daemon Sets
28. 28
• Service
• provides load-balancing. Addressed via IP (cluster IP) or a
DNS name.
• Network Policy
• manages routing rules across pods (east-west traffic.)
• Ingress
• manages external routes to services (north-south traffic.) An
Ingress Controller does the load-balancing. Ingress Resources
specify the rules.
Networking your app
36. 36
Enterprises are adopting containers
for agility, portability, and increased
efficiencies
Kubernetes is the best solution to
orchestrate containers at scale
Nirmata provides the best way to
manage Kubernetes clusters and
workloads on any cloud
Kubernetes enables Enterprise Agility