DevOps with
Kubernetes and
Helm
Jessica Deen
Cloud Developer Advocate
HELLO!
I am Jessica Deen
I am here because I love technology and
community.
I focus heavily on Linux, OSS, DevOps and
Containers.
I love Disney and CrossFit/Fitness.
You can find me at @jldeen on GitHub,
Twitter, and Instagram.
Disclaimer
The next 60 minutes will NOT make
you an expert, but it will:
- Get you thinking
- Show you what’s possible
- Give you some sample code for you to get
started on your own time
GOING DIGITAL
1 million/hour 12 years 60% computing
new devices average age of S&P in the public cloud
coming online 500 corporations by 2025
by 2020 by 2020
developers
I need to create applications New applications run smoothly My productivity and application
at a competitive rate without on my machine but malfunction innovation become suspended
worrying about IT on traditional IT servers when I have to wait on IT
IT
I need to manage servers I’m unsure of how to integrate I’m unable to focus on both
and maintain compliance unfamiliar applications, and I server protection and
with little disruption require help from developers application compliance
IT stress points
Security Datacenter Supporting
threats efficiency innovation
Cloud is a new way to think about a datacenter
Servers Services
DevOps: The Three Stage
Conversation
People Process Products
DevOps is the union of people,
process, and products to enable
continuous delivery of value to
our end users.
-Donovan Brown
http://bit.ly/WhatIs-DevOps
Key DevOps Practices
Infrastructure as Continuous Continuous
Code Integration Deployment
Automated Testing Release Performance
Management Monitoring
Availability Load Testing & Automated
Recovery (Rollback
Monitoring Auto Scale & Roll Forward)
DevOps Benefits
IT Performance Metrics
2015 2016 2017
Deployment 30x more 200x more 46x more
Frequency frequent frequent frequent
Lead Time for
200x faster 2,555x faster 440x faster
Changes
Mean Time to
Recover 168x faster 24x faster 96x faster
(MTTR)
Change Failure 3x lower (1/3 5x lower (1/5
Rate as likely) as likely)
Source: https://puppetlabs.com
Enable ‘write-once, run-anywhere’ apps
Enables microservice architectures
DevOps
Great for dev/test of apps and services
Production realism
Growing Developer Community
Developers
Portability, Portability, Portability
Standardized development, QA, and prod
environments
Abstract differences in OS distributions
and underlying infrastructure
Higher compute density
Operations Easily scale-up and scale-down in
response to changing business needs
What is a Container?
Not a real thing. An application delivery mechanism with
process isolation based on several Linux kernel features.
Namespaces (what a Cgroups (what a process
process can see) can use)
v PID v Memory
v Mount v CPU
v Network v Blkio
v UTS v Cpuacct
v IPC v Cpuset
v User v Devices
v Cgroup v Net_prio
What is
v Open Source Container Runtime
v Mac, Linux, Windows Support
v Command Line Tool
v “Dockerfile” format
v The Docker image format with layered
filesystem
Docker Layered Filesystem
Docker Layered Filesystem
Virtualization versus containerization
Virtualization Containerization
Virtual machine Container
Application XYZ
Application
App dependencies
Dependencies
Guest OS
C C C C C
VM VM VM
Dependency 1 Dependency 2
VM VM VM
Hypervisor 2 Docker Engine
Hypervisor 1 Host OS Host OS
Hardware Hardware Hardware
Type 1 Type 2
The container advantage
Fast Agile Immutability Cost Efficient Elastic
iteration delivery savings deployment bursting
For developers For IT
Demo
What did we just do?
Kubernetes Pipeline
Build Kubernetes Repository
Package
Deploy
Test
Container Orchestration:
Kubernetes
What is Kubernetes?
Open source container orchestrator that automates
deployment, scaling, and management of applications.
Features include:
v Automatic bin packing v Designed by Google
v Self-healing v Based on their
system used to
v Horizontal scaling
run BILLIONS of
v Service discovery containers per
v Load balancing week
v Automated rollouts and rollbacks v Over 2,300
v Secret and configuration contributors
management v Graduated from CNCF
Who is using Kubernetes?
Azure Kubernetes Service
(AKS)
Your Kubernetes Cluster
Managed by Azure
Why AKS?
Easy to use: Easy to manage:
v Fastest path to Kubernetes on v Automated upgrades
Azure and patching
v Up and running with 3 simple v Easily scale the
commands cluster up and down
v I argue there are 2.5 commands v Self-healing control
plane
Uses open APIs – 100% upstream Kubernetes
Getting Started with AKS
$ az aks create -g myResourceGroup -n myCluster --generate-ssh-keys
\ Running ..
$ az aks install-cli
Downloading client to /usr/local/bin/kubectl ..
$ az aks get-credentials -g myResourceGroup -n myCluster
Merged "myCluster" as current context ..
$ kubectl get nodes
NAME STATUS AGE VERSION
aks-mycluster-36851231-0 Ready 4m v1.8.1
aks-mycluster-36851231-1 Ready 4m v1.8.1
aks-mycluster-36851231-2 Ready 4m v1.8.1
Managing an AKS Cluster
$ az aks list –o table
Name Location ResourceGroup KubernetesRelease
ProvisioningState
------------------ ---------- -------------- ------------------- ------------
-------
myCluster westus2 myResourceGroup 1.7.7 Succeeded
$ az aks upgrade -g myResourceGroup -n myCluster –-kubernetes-version 1.8.1
\ Running ..
$ kubectl get nodes
NAME STATUS AGE VERSION
aks-mycluster-36851231-0 Ready 12m v1.8.1
aks-mycluster-36851231-1 Ready 8m v1.8.1
aks-mycluster-36851231-2 Ready 3m v1.8.1
$ az aks scale -g myResourceGroup -n myCluster --agent-count 10
\ Running ..
Kubernetes without AKS
Master VM Master VM Agent VM Agent VM Agent VM Agent VM
Master VM Agent VM Agent VM Agent VM Agent VM
Control Plane Agent Pool
Kubernetes with AKS
Agent VM Agent VM Agent VM Agent VM
Hosted Control
Plane
Agent VM Agent VM Agent VM Agent VM
Agent Pool
Azure Container
Release automation tools
Service (AKS)
Simplifying the Kubernetes experience
Azure Container
Instances (ACI)
Azure Container
Registry
Streamlined The package Event-driven Visualization
Kubernetes manager for scripting for dashboard for
Open Service development Kubernetes Kubernetes Brigade
Broker API (OSBA)
Release
Automation Tools
Azure Container
Helm
Service (AKS)
The best way to find, share, and use software
built for Kubernetes
Azure Container
Instances (ACI)
Azure Container
Registry
Manage complexity Easy updates Simple sharing Rollbacks
Charts can describe Take the pain out Charts are easy to Use helm rollback
complex apps; provide of updates with in- version, share, and host to roll back to an older
Open Service repeatable app installs, and place upgrades and on public or private version of a release
Broker API (OSBA)
serve as a single point of custom hooks servers with ease
authority
Release
Automation Tools
Azure Container
Helm
Service (AKS)
Helm Charts helps you define, install, and upgrade
even the most complex Kubernetes application
Azure Container services ci
Instances (ACI) db
load balancer
custom
…
Azure Container Chart.yml
Registry
Open Service
Broker API (OSBA)
Release
Automation Tools
Azure Container
Service (AKS)
Simple app development and deployment – into
any Kubernetes cluster
Azure Container
Instances (ACI)
Azure Container
Registry
Simplified development Language support
Using two simple commands, developers Draft detects which language your app is
Open Service can now begin hacking on container-based written in, and then uses packs to
Broker API (OSBA) applications without requiring Docker or generate a Dockerfile and Helm Chart
even installing Kubernetes themselves with the best practices for that language
Release
Automation Tools
Demo
5 Kubernetes Best Practices
v Build small containers
v Application architecture
v Use Namespaces
v Use helm charts
v RBAC
v Implement Health checks
v Set requests and limits
v Be mindful of your services
v Map external services
v Don’t rely on load balancers
THANKS!
Resources
aka.ms/devops/jaxlondon2018
Any questions?
You can find me at:
@jldeen · jessica.deen@microsoft.com