QCon北京2018 《Kubernetes +面向未来的开发和部署》 Michael+Chen
2020-03-01 57浏览
- 1.Kubernetes – Software Platform for the Future Michael Chen VMware
- 2.
- 3.
- 4.• • • • Hello World! Containerize Applications Micro Services Applications Scalable Kubernetes Applications • Scalable Infrastructure for Applications Developer 4
- 5.Platform Application Operating System Physical Infrastructure
- 6.Containers as Enabler Fast Lightweight Portable Boot Environments Rapidly Minimal Resources Needed Ability to Move Containers Freely
- 7.Containers and VMs - A Practical Comparison The hypervisor virtualizes the hardware limiting the number of hardware dependences that you need to install on the OS Application Containers Operating System Virtualization Physical Infrastructure Containers virtualize the operating system limiting the the number of application dependencies that you need to install on the OS.
- 8.2 technologies with 2 different objectives Application Abstract the App From the OS Containers Docker Allows you to run multiple applications on the same OS Operating System Abstract the OS from the hardware VMs VMware Hypervisor Physical Infrastructure Allows you to run multiple OS on the same hardware
- 9.Containers User Cases Developer Sandbox • Ready-to-go development • Self-service portal Application Repackaging • Simplify app maintenance • Improve developer workflow Cloud Native • New application development • 12-factor apps, PCF 9
- 10.The need for containers and containers orchestrators Application Journey v Platform Evolution v Legacy Application Application Repackaging App packaged in VM Application Refactoring Modernized Application App packaged in Container
- 11.Docker and Kubernetes Docker Run One Container at a Time • Core docker functionality provides the tooling to create and run single containers – Very manual, no fault tolerance, hard to scale, etc $docker run container1 Kubernetes in 5 minhttps://youtu.be/PH-2FfFD2PUKubernetes Orchestrating Multiple Containers • Scheduling, provisioning, and resource management of multiple containers – Docker, Mesos à Kubernetes Support – AWS, Azure, Google à Kubernetes Services $kubectl create –f App.yaml $docker run container2Wanted:Container Orchestrator! $docker run container3 $docker run container4 The “App” The “App” Kubernetes Cluster Confidential │ ©2018 VMware, Inc. 11
- 12.What is Kubernetes? Docker Host App 1 App 2 App 3 Bins/Libs Bins/Libs Bins/Libs Container Engine OS 12
- 13.What is Kubernetes? Docker Host Docker Host Docker Host App 1 App 2 App 3 App 1 App 2 App 3 App 1 App 2 App 3 Bins/Libs Bins/Libs Bins/Libs Bins/Libs Bins/Libs Bins/Libs Bins/Libs Bins/Libs Bins/Libs Kubernetes Slave Kubernetes Slave Kubernetes Slave Container Engine Container Engine Container Engine OS OS OS Kubernetes Master 13
- 14.https://youtu.be/PH-2FfFD2PUKubernetes 101 at the Highest Level • Container Cluster = “Desired State Management” P1R1 – Kubernetes Cluster Services (w/API) K • Node = Container Host w/agent called “Kubelet” P2R1 P2R1 Worker Node VM • Application Deployment File = Configuration File of desired state P1R2 • Container Image = Runs in a Pod (~1:1) • Replicas = QTY of Pods that must be running P1R1 K P2R1 P1R1 Worker Node VM App_X.yaml P1R3 ContainerImage1Replicas:'>Replicas: