Mais conteúdo relacionado Semelhante a The rise of microservices (20) The rise of microservices1. © 2018 Cloud Technology Experts INC
Damian Igbe, PhD
● PhD in Computer science
● Founder & CTO of Cloud Technology Experts Inc
● Linux Systems Administrator
● Kubernetes Certified Administrator
● Kubernetes Doc team contributor
● Organizer of Kubernetes and CloudNative Dallas Meetup
https://www.meetup.com/Kubernetes-and-Cloud-Native-
North-Dallas/
2. © 2018 Cloud Technology Experts INC
The Rise of Kubernetes and
Microservices
3. © 2017 Cloud Technology Experts INC. All rights reserved.
Cloud Technology Experts
Agenda
● The Case for Docker/Kubernetes
● Monolith, Microservices, CNCF, Docker/Kubernetes,
Service Mesh
● Kubernetes Architecture
● Some hands-on?
4. © 2018 Cloud Technology Experts INC
The First Premise
Software Is Eating the World
--Marc Andreessen
-source website
https://www.wsj.com/articles/SB10001424053111903480904576512250915629460
Uber, Lift, Airbnb, Amazon, Netflix, google,Ebay/Paypal,Groupon,FB, Twitter,Linkedin, Cloud,
SDN/NFV
5. © 2018 Cloud Technology Experts INC
Second Premise
The future platform is the Cloud or Multi-cloud or Hybrid.
6. © 2018 Cloud Technology Experts INC
Third Premise
Microservices is the future.
Successful Microservice Implementations:
Netflix, Google, Credit Karma, Ebay,
Groupon, REAGroup, Soundcloud, Uber, Lift
7. © 2018 Cloud Technology Experts INC
Monolith/Brownfield Applications
8. © 2018 Cloud Technology Experts INC
Monolith/Brownfield Applications
Pros:
● Monolithic applications are very simple to develop because of all the tools and IDEs support to that kind of
application by default.
● Very easy to deploy because all components are packed into one bundle.
● The architecture has less moving parts.
Cons:
● Very difficult to understand and create the patches for monolithic applications.
● Adapting to new technology is very challengeable.
● Very difficult to maintain CI/CD pipeline.
● Maintainability is very high and braking of one code line will stop the whole process.
● Take a long time to startup because all the components need to get started.
● One component failure will cause the whole system to fail.
● Not suitable for Agile.
9. © 2018 Cloud Technology Experts INC
Microservices/Greenfield Applications
10. © 2018 Cloud Technology Experts INC
Monolith/Brownfield Applications
11. © 2018 Cloud Technology Experts INC
Microservices
Pros:
● Can use the latest technologies to develop the microservices.
● Composability is very high.
● Can scale independent microservices separately. No need to scale the whole the system.
● One component failure will not cause entire system downtimes.
● When developing an overall solution we can parallel the microservices development task with the small
teams. So it helps to decrease the development time.
● CI/CD is very easy.
Cons:
● Independent code base maintenance is very difficult.
● Monitoring the overall system is very challenging because of decentralization. Communication needs to be
very strong to communicate with independent modules.
● Has additional performance overhead because of network latency.
● Complexity
12. © 2018 Cloud Technology Experts INC
Agile Software dev and Goto Mkt
● Microservices and Agile Software Dev. has
seen significant result in software releases.
● If software is eating the world, Goto
Market/Competitive Advantage is the key
Netflix, Google, Credit Karma, Ebay, Groupon,
REAGroup, Soundcloud, Uber, Lift
13. © 2018 Cloud Technology Experts INC
The link between present and future
14. © 2018 Cloud Technology Experts INC
Docker/Kubernetes (DK)
● DK is the link between the present and the
future
● DK enables Microservices
● DK enables Agile Software Development
● DK empowers multicloud, hybrid Cloud
because of portability and platform
independence
15. © 2018 Cloud Technology Experts INC
Microservices/Greenfield Applications
16. © 2018 Cloud Technology Experts INC
Challenges of Microservices
17. © 2018 Cloud Technology Experts INC
K8S to the Rescue of Microservices
18. © 2018 Cloud Technology Experts INC
Enters CNCF
● Cloud Native is open source cloud computing for
applications, a trusted tool kit for modern architectures.
● There are many routes to deploying a cloud native
application, with CNCF Projects representing a particularly
well-traveled path.
● Promote use of good patterns through community
education
● https://www.cncf.io/
19. © 2018 Cloud Technology Experts INC
CNCF Ref. Architecture Fundamentals
ObservabilityandAnalysis
20. © 2018 Cloud Technology Experts INC
https://raw.githubusercontent.com/cncf/landscape/master/landscape/CloudNativeLandscape_latest.png
21. © 2018 Cloud Technology Experts INC
Architecture of Microservices
22. © 2018 Cloud Technology Experts INC
Greek for “Helmsman”; also the root of the
words “governor” and “cybernetic”
• Infrastructure for containers
• Schedules, runs, and manages containers
on virtual and physical machines
• Platform for automating deployment,
scaling, and operations
Kubernetes
23. © 2018 Cloud Technology Experts INC
Docker: A New Way of Deploying Apps
OS-level virtualization
Isolated, from each other and from the host
• filesystems
• processes
• resources
Small and fast ⇒ enables 1:1 app to image
• Unlocks benefits of microservices
• Consistency from development to production
• Portable across OS distros and clouds
• Application-centric management
Operating System
Container Manager
Runtime
System
Application
Runtime
System
Application
Runtime
System
Application
24. © 2018 Cloud Technology Experts INC
Scheduling: Decide where my containers should run
Lifecycle and health: Keep my containers running despite failures
Scaling: Make sets of containers bigger or smaller
Naming and discovery: Find where my containers are now
Load balancing: Distribute traffic across a set of containers
Storage volumes: Provide data to containers
Logging and monitoring: Track what’s happening with my containers
Debugging and introspection: Enter or attach to containers
Identity and authorization: Control who can do things to my containers
K8S/Container Orchestration
25. © 2018 Cloud Technology Experts INC
Scheduling
Placement,replication/scaling,rescheduling,rolling
deployment,upgrades,downgrades,collocation
Resource Management
Memory,cpu,gpu,volumes,ports,ip addresses,images/artifacts
Service Management
Labels,groups/namespaces,dependencies,health checks,readiness checks
Container Orchestration
26. © 2018 Cloud Technology Experts INC
Drive current state → desired state
Observed state is truth
Act independently
• choreography rather than
orchestration
Recurring pattern in the system
Kubernetes Control Loop
27. © 2018 Cloud Technology Experts INC
Sample Complete Picture
28. © 2018 Cloud Technology Experts INC
Sample Complete Picture
29. © 2018 Cloud Technology Experts INC
Sample Complete Picture on AWS
41. © 2018 Cloud Technology Experts INC
Service mesh : Istio
47. © 2018 Cloud Technology Experts INC
Istio
● Service observability
● Graduated deployment and release
● Policy enforcement
● Cluster reliability
● Chaos testing
● Fleet configuration
● Strong security options
49. © 2018 Cloud Technology Experts INC
KUBERNETES ARCHITECTURE
50. © 2018 Cloud Technology Experts INC
Cluster Components
Master/Controller
● API Server (kube-apiserver)
● Scheduler (kube-scheduler)
● Controller manager (kube-controller-manager)
● etcd (stores cluster state)
Node
● Kubelet (“node agent”)
● Kube-proxy
● Container Runtime (Docker,rkt)
51. © 2018 Cloud Technology Experts INC
Kubernetes Architecture
52. © 2018 Cloud Technology Experts INC
Architecture: Master Node
Master Node (“Control Plane”)
kube-apiserver
- Point of interaction with the cluster
- Exposes http endpoint
kube-controller-manager
- Responsible for most of the important stuff
- Interacts with the api server to retrieve cluster state
- Ensures correct number of pods are running
- Reacts to Nodes being added / deleted
- Manages Service Accounts and security tokens
kube-scheduler
- Schedules newly created pods to a Node
53. © 2018 Cloud Technology Experts INC
Architecture: Master Node
Master Node (“Control Plane”)
Etcd
- Stores the state of the cluster
- Doesn’t necessarily have to be co-located with other components
- Must be backed up in a production scenario
54. © 2018 Cloud Technology Experts INC
Architecture: Worker Node
kubelet
● Agent for running Pods
● Mounts volumes for Pods where required
● Reports the status of Pods back to rest of system
kube-proxy
● Enforces network rules on each Node (uses iptables)
● Responsible for forwarding packets to correct destination
55. © 2018 Cloud Technology Experts INC
How to Deploy
● Minikube
● On-Premise (Baremetal, GPU)
● Cloud: AWS EKS
● Google Cloud (GKE)
● Azure Kubernetes Service (AKS)
● Check CNCF Framework for other platforms
56. © 2018 Cloud Technology Experts INC
Kubernetes Objects
● PODs
● Replicasets
● Deployments
● Services
● StatefulSets
● Secrets/Configmaps
● etc etc
57. © 2018 Cloud Technology Experts INC
Cloud Technology Experts Inc
www.cloudtechnologyexperts.com
@expertscoud
800-690-2675
58. © 2018 Cloud Technology Experts INC
Cloud Technology Experts Inc
● Main Focus is Cloud Training and Consulting on
CNCF Framework
● Core Focus Areas:
○ Docker/Kubernetes
○ Microservices/CloudNative
○ Cloud Platform:AWS
● AWS Authorized Consulting Partner
59. © 2018 Cloud Technology Experts INC
CTE Courses
● 1-Day Docker Fundamentals
● 1-Day Kubernetes Fundamentals
● 3-Day Kubernetes Certified Administrator
● 3-Day Docker/Kubernetes and Security Hardening
● 3-Day Microservices with Docker and Kubernetes
61. © 2018 Cloud Technology Experts INC
References
● Making Microservices Micro with Istio Service Mesh by Ray Tsang
● https://blog.buoyant.io/2017/04/25/whats-a-service-mesh-and-why-do-i-need-one/
● https://thenewstack.io/introducing-microservices-hierarchy-needs/
● https://developers.redhat.com/blog/2016/12/09/spring-cloud-for-microservices-compared-t
o-kubernetes/
● https://aws.amazon.com/blogs/devops/continuous-deployment-to-kubernetes-using-aws-c
odepipeline-aws-codecommit-aws-codebuild-amazon-ecr-and-aws-lambda/
● https://kubernetes.io/blog/2016/10/kubernetes-and-openstack-at-yahoo-japan/
● https://dzone.com/articles/easily-automate-your-cicd-pipeline-with-jenkins-he
● https://dzone.com/articles/monolithic-to-microservices
● https://microservices.io/patterns/monolithic.html