## Demystifying Kubernetes
## Issues of traditional application management - Unexpected application crash - Resource saturation: usually CPU, Memory and diskspace - Traffic surge ! - Hardware/Cloud provider failures
### Fixing these in traditional manner - Waking up in the middle of the night ! - Ping the server to see if it's up ? - Check the logs or analyze the issue ? - Restart App or Provision more h/w (-+) - Check if application metrics are satisfactionary. - Apart from calling 1800-DEPLOYMENT !
### Aftermath - Humans add latency which causes increased MTTR. - Possibility of making mistakes ! - Business taking a hit ! 🔥 - Developer Happiness goes down the hill ! 🤯 - Dev effort grows propotional to no./size of application
### Building the perfect system - Remove "humans" from equation 🤖 - System should be proactive NOT reactive. - System has to understand the rules of application. - Ability to scale hardware and software. - All of this should be done without waking up developer !
![morpheus](/assets/images/morpheus.jpg)
## Enter Kubernetes ![budha](/assets/images/budha.jpg) - Image sourced from fineartamerica.com
### Pre-requisites for Kubernetes - Kubernetes doesn't know how to run an application, It only knows to spin up container images. - Can containarize applications with Docker and pass it to Kubernetes. - Kubernetes Configuration YAML DSL
### Container - Container are a isolated runtime which runs on host, created by running images. - We use Dockerfiles to create images. ![pods](/assets/images/container.png)
### Pods - Kubernetes abstraction of containers to provide additional configurations to containers. ![pods](/assets/images/pods.svg)
### Hands On setup ! - brew install docker - brew install kubernetes-cli - brew cask install minikube - brew cask install virtualbox [Give permission to add virtualization driver] - minikube start - github.com/albertpaulp/demystifying-kubernetes-demo
### How Kubernetes works ! - K8 knows how to deploy containers. - K8 knows how to check health of application. - K8 can restart/reschedule application if case if it's unhealthy. - K8 can scale up/down underlying hardware and software. - K8 can be configured for a High Availability architecture.
### Kubernetes Architecture - One master node to rule 'em all. (Can have multiple master for HA) ![architecture](/assets/images/architecture.png)
### Kubernetes Deployment Components - Deployment configuration - Service configuration
### Demo Time ! - Use minikube if that's setup. - If not, use katacoda.com/courses/kubernetes/playground - Create deployment - Show Fault tolerence - Show scaling
### Thank You for your time 🍪 ### Questions, keep 'em coming.. Shoutouts to Mohit and Parthesh 🍻
@albertpaulp</sup </textarea> </section> </div> </div>