Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Kubernetes 101
By : Vishwas Narayan
We just need them to
Handle compute resources That were limited to every person in the worl
● Prioritization,Tracking,Limiting,and also Isolation.
● CPU,RAM,IO,Networking
Monolith and microservice
Cloud native application are
Cloud native is a term used to generally describe container-based environments.
Cloud-native technologies are used to develop applications built with services
packaged in containers, deployed as microservices and managed on elastic
infrastructure through agile DevOps processes and continuous delivery workflows.
● A container-based infrastructure.
● An architecture built around microservices.
● Use of continuous integration and continuous delivery (CI/CD)
● Composed of Microservices
● Packaged in Containers
● Rapidly (Re)Deployable in a Continuous Delivery Model
Microservice
● One job
● Separate processes
● Execution scope
● CI/CD
● Resiliency
● Independent
● Flexible/Scalable
● Replaceable
● Upgradable
Why Microservice?
● Each team is independent from the rest, decoupling
the release cycle with others.
● Clear separation of boundaries.
● Easier to identify when things go wrong.
● Choice of programming language appropriate for the
task.
● Refactoring becomes easier.
● Enabler for CI/CD pipelines.
Microservice to the world of the development
Software containers
● 1 image -> Many containers
○ Laptop, DC, cloud
○ Dev, QA, production, support
● Simple, efficient
● Isolation
● Constraints
Docker is all about these factors
●Standardized packaging for software and dependencies
●Isolate apps from each other
●Share the same OS kernel
●Works with all major Linux and Windows Server
Container are very light weight
SERVER
HOST OS
GUEST OS
HYPERVISOR
LIBRARIES/Bin
APP A
GUEST OS
LIBRARIES/Bin
APP B
VM
SERVER
HOST OS
APP A APP B
LIBRARIES LIBRARIES
CONTAINER
S
• Containers are isolated but share OS
• Increase the compute density and
memory utilization
DOCKER ENGINE
Benefits of VM
• Better resource pooling
– One physical machine divided into multiple virtual
machines
• Easier to scale
• VMs in the cloud
– Rapid elasticity
– Pay as you go model
Docker
• Simple to use
• 100K+ images on Docker Hub
• Build images from images
• Platforms
– Linux, OS X, Windows
– Laptop, VM, Cloud,…
– Cloud services
History of Docker
Docker Architecture
All the above thing can be handled using
Containers
The new big thing
From Dev To Ops
PHYSICAL VIRTUAL CLOUD
Any Application
Docker Platform
Docker Image
Docker Engine
Registry Service (Docker Hub or Docker Trusted Registry)
Cloud or server based storage and distribution service for images
Docker Container
Kubernetes 101
Docker Hub: Build, Ship, Run Applications
Build Ship
Run
Dev
QA
Source
Staging
Physical
Virtual
Cloud
InfrastructureManagement
InfrastructureManagement
DockerFile
Source Code
Repository
TEST
TEST
TEST
TEST
TEST
GCE RAX Azure
Mac/Win Dev
Machine
Boot2Docker
Docker
Analytics
DB
Prod
Machine
Linux OS
Docker
Docker
++
Users Collab
Provenance Policy
Docker Hub
Registries
Public Curated Private
Docker Hub API
Third Party Tools
Prod
Machine
Linux OS
Docker
Docker
Prod
Machine
Linux OS
Docker
Docker
VM
Docker
Docker
VM
Docker
Docker
VM
Docker
Docker
QA Machine
Linux OS
Docker
Docker
Docker Hub provides a centralized resource for container image discovery,
distribution and change management, user and team collaboration, and workflow
automation
Docker Hub: Build, Ship, Run Applications
Build Ship
Run
Dev
QA
Source
Staging
Physical
Virtual
Cloud
InfrastructureManagement
InfrastructureManagement
DockerFile
Source Code
Repository
TEST
TEST
TEST
TEST
TEST
GCE RAX Azure
Mac/Win Dev
Machine
Boot2Docker
Docker
Analytics
DB
Prod
Machine
Linux OS
Docker
Docker
++
Users Collab
Provenance Policy
Docker Hub
Registries
Public Curated Private
Docker Hub API
Third Party Tools
Prod
Machine
Linux OS
Docker
Docker
Prod
Machine
Linux OS
Docker
Docker
VM
Docker
Docker
VM
Docker
Docker
VM
Docker
Docker
QA Machine
Linux OS
Docker
Docker
Docker Hub provides a centralized resource for container image discovery,
distribution and change management, user and team collaboration, and workflow
automation
Kubernetes 101
Kubernetes has the DNA of the File System
Also Borg and Omega.
They just behaved monolithic
Inefficient to manage
Change on one module -> repackage the whole thing
Slows down the development velocity -> conflicts coordination,approval
Delays in identifying the root cause of failures
Responsibility issues ,blame games on the environment.
Container = Docker?
Image format : Upload,Download,Share,Build.
API : Automating Creation,Deletion,Starting,Stopping.
Networking will always be good
This is a fault proof networking
User benefits
Packaging,deployment and reuse
User benefits
Efficiency
But the caveat is
Security
Microservice that is built on containers
Many small, focused containers -> sophisticated
services
• Well defined APIs
• Independent languages & libraries
• Modular: easy maintenance + reuse
• Fault tolerant
• Scalable
• Immutable
Orchestration
Typically microservices are encapsulated
inside containers…
One:One relationship between a microservice
and a container Everyone’s container journey
starts with one container….
Kubernetes
Kubernetes is ancient Greek for "Helmsman". Root of the word "Governor",
"Cybernetics".
Kubernetes is a "Container Orchestrator" or "Cluster Manager".
● Places containers on nodes
● Recovers automatically from failure
● Basic monitoring, logging, health checking
● Enables containers to find each other.
Gaps today in the Dev to Production
● Multi-machine
● Discovery and Naming
● Scaling
● Multiple users
● Failure tolerance and recovery
● Monitoring
● Logging
● High availability
● Deployment lifecycle
● Load balancing
● etc, etc
Microservices are
● Microservice architecture – a variant of the service-oriented architecture
structural style – arranges an application as a collection of loosely-coupled
services. In a microservices architecture, services are fine-grained and the
protocols are lightweight.
● Split your application into small services that can be reused, remixed and
shared.
○ Enables smaller, nimble, decoupled teams and processes.
○ Better tooling enables and encourages microservices.
Kubernetes 101
Development History
● Based on ideas proven at Google over 10 years
● Everything at Google runs in a container.
● Google launches 2 billion containers per week.
● Part of a larger set of tools that make up the internal Google platform.
Kubernetes ts open source
● https://github.com/kubernetes/kubernetes
● Very active open source project
● 23k stars, 1400+ contributors
● Apache 2 licensed
● Written in Go
● Hosted by the Cloud Native Computing Foundation (CNCF)
Benefits
● Extend the container goodness across nodes.
● Enable operations specialization. Cluster Ops vs. App Ops
● Reduce cost to run many things in production. Enables new ways of building applications.
Benefits of Kubernetes
1. Intelligent Scheduling
2. Self-healing
3. Horizontal scaling
4. Service discovery & load balancing
5. Automated rollouts and rollbacks
6. Secret and configuration management
Design Principles
● declarative > imperative
● control loops
● simple > complex
● modularity
● legacy compatible
● network-centric
● labels > hierarchy
● cattle > pets
● open > closed
Cluster
Master
API Server
Scheduler
Controller
etcd
Kubelets
Docker
NODE
Kubelets
Docker
NODE
Kubelets
Docker
NODE
Pod
Log Server Serving App Data Loader
LOGS App Data
Pod - Label
C1 C2 C3
V1 V2
Version = 1.0
Service = FE
App = Hello
Replica Set
Replicas = 2
Pod Template
Replica Set
Replicas = 1
Pod Template
Persistent Volume Claim
Persistent
Volume
So much more
1. Namespace
2. Ingress
3. Deployment
4. Jobs
5. Autoscaling
6. Daemonsets
Continued
1. Role Based Access Control
2. Multiple Scheduling
3. Flexible Scheduling Constraints
4. Stateful sets
5. Automatic Cluster Scaling
6. Cloud Provider integration
7. Network Policy
Ecosystem
● Platforms
● Operators
● Authentication Provider
● Helm
● Extended Network Policy

More Related Content

Kubernetes 101

  • 1. Kubernetes 101 By : Vishwas Narayan
  • 2. We just need them to Handle compute resources That were limited to every person in the worl ● Prioritization,Tracking,Limiting,and also Isolation. ● CPU,RAM,IO,Networking
  • 4. Cloud native application are Cloud native is a term used to generally describe container-based environments. Cloud-native technologies are used to develop applications built with services packaged in containers, deployed as microservices and managed on elastic infrastructure through agile DevOps processes and continuous delivery workflows. ● A container-based infrastructure. ● An architecture built around microservices. ● Use of continuous integration and continuous delivery (CI/CD) ● Composed of Microservices ● Packaged in Containers ● Rapidly (Re)Deployable in a Continuous Delivery Model
  • 5. Microservice ● One job ● Separate processes ● Execution scope ● CI/CD ● Resiliency ● Independent ● Flexible/Scalable ● Replaceable ● Upgradable
  • 6. Why Microservice? ● Each team is independent from the rest, decoupling the release cycle with others. ● Clear separation of boundaries. ● Easier to identify when things go wrong. ● Choice of programming language appropriate for the task. ● Refactoring becomes easier. ● Enabler for CI/CD pipelines.
  • 7. Microservice to the world of the development Software containers ● 1 image -> Many containers ○ Laptop, DC, cloud ○ Dev, QA, production, support ● Simple, efficient ● Isolation ● Constraints
  • 8. Docker is all about these factors ●Standardized packaging for software and dependencies ●Isolate apps from each other ●Share the same OS kernel ●Works with all major Linux and Windows Server
  • 9. Container are very light weight SERVER HOST OS GUEST OS HYPERVISOR LIBRARIES/Bin APP A GUEST OS LIBRARIES/Bin APP B VM SERVER HOST OS APP A APP B LIBRARIES LIBRARIES CONTAINER S • Containers are isolated but share OS • Increase the compute density and memory utilization DOCKER ENGINE
  • 10. Benefits of VM • Better resource pooling – One physical machine divided into multiple virtual machines • Easier to scale • VMs in the cloud – Rapid elasticity – Pay as you go model
  • 11. Docker • Simple to use • 100K+ images on Docker Hub • Build images from images • Platforms – Linux, OS X, Windows – Laptop, VM, Cloud,… – Cloud services
  • 14. All the above thing can be handled using Containers The new big thing
  • 15. From Dev To Ops PHYSICAL VIRTUAL CLOUD Any Application
  • 16. Docker Platform Docker Image Docker Engine Registry Service (Docker Hub or Docker Trusted Registry) Cloud or server based storage and distribution service for images Docker Container
  • 18. Docker Hub: Build, Ship, Run Applications Build Ship Run Dev QA Source Staging Physical Virtual Cloud InfrastructureManagement InfrastructureManagement DockerFile Source Code Repository TEST TEST TEST TEST TEST GCE RAX Azure Mac/Win Dev Machine Boot2Docker Docker Analytics DB Prod Machine Linux OS Docker Docker ++ Users Collab Provenance Policy Docker Hub Registries Public Curated Private Docker Hub API Third Party Tools Prod Machine Linux OS Docker Docker Prod Machine Linux OS Docker Docker VM Docker Docker VM Docker Docker VM Docker Docker QA Machine Linux OS Docker Docker Docker Hub provides a centralized resource for container image discovery, distribution and change management, user and team collaboration, and workflow automation
  • 19. Docker Hub: Build, Ship, Run Applications Build Ship Run Dev QA Source Staging Physical Virtual Cloud InfrastructureManagement InfrastructureManagement DockerFile Source Code Repository TEST TEST TEST TEST TEST GCE RAX Azure Mac/Win Dev Machine Boot2Docker Docker Analytics DB Prod Machine Linux OS Docker Docker ++ Users Collab Provenance Policy Docker Hub Registries Public Curated Private Docker Hub API Third Party Tools Prod Machine Linux OS Docker Docker Prod Machine Linux OS Docker Docker VM Docker Docker VM Docker Docker VM Docker Docker QA Machine Linux OS Docker Docker Docker Hub provides a centralized resource for container image discovery, distribution and change management, user and team collaboration, and workflow automation
  • 21. Kubernetes has the DNA of the File System Also Borg and Omega.
  • 22. They just behaved monolithic Inefficient to manage Change on one module -> repackage the whole thing Slows down the development velocity -> conflicts coordination,approval Delays in identifying the root cause of failures Responsibility issues ,blame games on the environment.
  • 23. Container = Docker? Image format : Upload,Download,Share,Build. API : Automating Creation,Deletion,Starting,Stopping.
  • 24. Networking will always be good This is a fault proof networking
  • 27. But the caveat is Security
  • 28. Microservice that is built on containers Many small, focused containers -> sophisticated services • Well defined APIs • Independent languages & libraries • Modular: easy maintenance + reuse • Fault tolerant • Scalable • Immutable
  • 29. Orchestration Typically microservices are encapsulated inside containers… One:One relationship between a microservice and a container Everyone’s container journey starts with one container….
  • 30. Kubernetes Kubernetes is ancient Greek for "Helmsman". Root of the word "Governor", "Cybernetics". Kubernetes is a "Container Orchestrator" or "Cluster Manager". ● Places containers on nodes ● Recovers automatically from failure ● Basic monitoring, logging, health checking ● Enables containers to find each other.
  • 31. Gaps today in the Dev to Production ● Multi-machine ● Discovery and Naming ● Scaling ● Multiple users ● Failure tolerance and recovery ● Monitoring ● Logging ● High availability ● Deployment lifecycle ● Load balancing ● etc, etc
  • 32. Microservices are ● Microservice architecture – a variant of the service-oriented architecture structural style – arranges an application as a collection of loosely-coupled services. In a microservices architecture, services are fine-grained and the protocols are lightweight. ● Split your application into small services that can be reused, remixed and shared. ○ Enables smaller, nimble, decoupled teams and processes. ○ Better tooling enables and encourages microservices.
  • 34. Development History ● Based on ideas proven at Google over 10 years ● Everything at Google runs in a container. ● Google launches 2 billion containers per week. ● Part of a larger set of tools that make up the internal Google platform.
  • 35. Kubernetes ts open source ● https://github.com/kubernetes/kubernetes ● Very active open source project ● 23k stars, 1400+ contributors ● Apache 2 licensed ● Written in Go ● Hosted by the Cloud Native Computing Foundation (CNCF)
  • 36. Benefits ● Extend the container goodness across nodes. ● Enable operations specialization. Cluster Ops vs. App Ops ● Reduce cost to run many things in production. Enables new ways of building applications.
  • 37. Benefits of Kubernetes 1. Intelligent Scheduling 2. Self-healing 3. Horizontal scaling 4. Service discovery & load balancing 5. Automated rollouts and rollbacks 6. Secret and configuration management
  • 38. Design Principles ● declarative > imperative ● control loops ● simple > complex ● modularity ● legacy compatible ● network-centric ● labels > hierarchy ● cattle > pets ● open > closed
  • 40. Pod Log Server Serving App Data Loader LOGS App Data
  • 41. Pod - Label C1 C2 C3 V1 V2 Version = 1.0 Service = FE App = Hello
  • 42. Replica Set Replicas = 2 Pod Template
  • 43. Replica Set Replicas = 1 Pod Template
  • 45. So much more 1. Namespace 2. Ingress 3. Deployment 4. Jobs 5. Autoscaling 6. Daemonsets
  • 46. Continued 1. Role Based Access Control 2. Multiple Scheduling 3. Flexible Scheduling Constraints 4. Stateful sets 5. Automatic Cluster Scaling 6. Cloud Provider integration 7. Network Policy
  • 47. Ecosystem ● Platforms ● Operators ● Authentication Provider ● Helm ● Extended Network Policy