multiple VMs are not inefficient. • High coupling for the application or OS. • Limited performance • Startup time in minutes. Virtual Machines app libs kernel libs app app kernel app libs libs kernel kernel OS Virtualization
• Service discovery and Load balancing • Automated rollouts and rollbacks • Secrets and configuration management • Storage orchestration “Kubernetes is becoming the Linux of the cloud” Jim Zemlin, Linux Foundation
Kubernetes cluster through the Kubernetes API. • The Kubernetes API is (mostly) RESTful. • It allows us to create, read, update, delete resources. • We also can interact with Kubernetes through CLI tool or the client libraries.
made of 5 services: • Voting: A front-end web app written in Python which lets you vote between two options • Redis: To queue which collects new votes. • Worker: A Java worker which consumes votes and stores them in. • Database: A Postgres database backed by a container volume. • Result: A Node.js webapp which shows the results of the voting in real time. These 5 services are visible in the application's Kubernetes YAML file.
YAML for Kubernetes definitions. • Define you expect for deploying your application. • Kubernetes provides many kinds of resource for implementing container deployment, service exposing, ..., etc.
is an abstraction which defines a logical set of Pods and a policy by which to access them - sometimes called a micro-service. • Use IPTable(Random) or IPVS(Algorithms) for implementing load balancer. Service Client Proxy
that manages external access to the services in a cluster, typically HTTP. • Ingress can provide load balancing, SSL termination and name-based virtual hosting. • Use NGINX as a backend for implementing load balancer.
Autoscaler automatically scales the number of applications in a replication controller, deployment or replica set based on observed CPU utilization. • Support for using CLI to create HPA. • kubectl autoscale deployment php-apache --cpu- percent=50 --min=1 --max=10