Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Intro to GKE and app deployment with Kubernetes
1. Intro To GKE & Deploying
Apps With Kubernetes
By Aditya Patawari - DevopsNexus.com
2. About Me
● Founder and Principal Consultant at Devops Consultancy called Devops
Nexus.
● Google Developer Expert for Cloud.
● Contributor to projects like Kubernetes and Fedora/Centos Linux.
● Published Author & Speaker at various conferences Rootconf, FOSDEM,
Flock and FOSSASIA
3. What Are We Doing Today?
● What is Kubernetes?
● How does Google help?
● Deep dive into certain (namely, labels and selectors) Kubernetes features.
● Learn deployment as by-product.
4. Kubernetes? What is That?
● Originally developed at Google, now open-sourced.
● Handles container management, orchestration and scheduling.
● .. and manages the configuration, secrets, networking.
● .. provides mechanisms for scaling, deployments, routing traffic.
● You see why Google uses it.
5. Do I Need This Hassle?
● No. (Unless you want to)
● Use a hosted and managed solution like Google Kubernetes Engine
● Features highly available multimaster server.
● Whole bunch of house-keeping pods like dns, monitoring.
● Awesome dashboard.
6. Kubernetes Ingredients
● A cluster setup (We’ll use Google Kubernetes Engine)
● Your favorite container image (I love Nginx)
● Caution: The Nginx image in the demo is quite big. Please do not
download the images right away. We need the network for the demo.
7. Labels
● Standard key-value pairs
● Helps in identifying artifacts with certain attributes
● Let us label everything!
○ env
○ app
○ service
○ color
8. Imagine The Traffic Flow
● Start from the client.
● From client, traffic hits load balancer.
● Load balancer needs to find the server and route traffic
● Quite standard?
● Deployment strategies need to ensure that our load balancer can route
traffic to wherever WE WANT.
10. Initial Setup
● A two-node setup, one Kubernetes master and one Kubernetes node.
● A initial deployment of 2 Nginx 1.7.9 images.
● Check this out: https://git.io/v96VV
● A service (a.k.a. load balancer) to route traffic to this deployment.
● Check this out: https://git.io/v96Vy
11. Canary Deployment
Problem: For the purpose of testing, we need to route a part of the
traffic to a different version of application.
12. Canary Deployment
● If only our service (a.k.a. load balancer) could send some of the traffic to a
different deployment.
● How does service know where to send traffic?
● LABELs
● Create a deployment with canary image (Nginx 1.9.1) and same label
14. Rolling Deployment
● Take down a part of the cluster, and replace with newer version.
● Repeat until entire cluster runs new version of application.
● Builtin support for rolling deployment.
● Demo: https://git.io/v96Kh
15. Blue Green Deployment
Problem: Maintaining two separate cluster of application, blue and
green, and configuring load balancer to send traffic to the correct cluster
16. Blue Green Deployment
● Build cluster we want to switch over to.
● Remember, we can put multiple labels. Add a color label to the cluster.
● Edit the service on the fly to direct the traffic from blue to green or vice
versa.
● Check out: https://git.io/v9ieg