Old Dog Kubernetes Presentation

©Tom

Who Am I?

Who Am I?

  • Automation Engineer at Wi-Tronix LLC
    • My views are my own and do not represent my employer
  • Likes to build cool things and share them with others

Why do you need this?

  • You want a high-level introduction to Kubernetes
  • Want to understand the benefits of "thinking like a Kubernetes admin"

What Do I Promise?

  • No hype, buzzwords or BS

Thinking Like a Kubernetes Admin

  • Not only does your toolset change, but your inputs and outputs also change.

How Will We Learn?

  • Part 1: Cool, open-ended demo!
  • Part 2: Analyze What We Did

Part 0 - Background

What's Kubernetes?

  • A platform for managing VM's and containers
  • Free and Open Source

What's a Microservice

  • Anything you can trick your boss into thinking it is 😉
  • Small chunk of code that does one thing well

What's Smaller Than a Microservice?

  • Functions!
  • e.g. AWS Lambda, OpenFaaS

there-is-no-cloud.jpeg

Part 1 - Deploying an API and Function Gateway On a New Kubernetes Cluster

What Are We Deploying?

OpenFaaS

openfaas-logo.jpeg

OpenFaaS

  • Function and API gateway (like Amazon Lambda)
  • Free and open source

A Couple of Functions

We'll be deploying some of the functions from this lab:

Demo

Creating our Kubernetes Cluster

Deploy OpenFaaS

Deploying Functions

Playtime!

bart-millhouse-jumping-on-bed.gif

Part 2 - Deeper Dive

What Did We Just Do?

Declared Our System, Not Installed It

  • No Puppet, no shell scripts
  • Use YAML1 to declare what your system should look like

Primitives

  • Great, extendable layer of abstraction
Primitive Examples
  • Pods
  • Deployment
  • App
  • Service
  • Ingress
  • PersistentVolume
You Can Add Your Own
  • The Kubernetes project maintainers can't think of everything :-)
  • Examples
    • CertificateRequest

What Didn't We Just Do?

We Didn't Have To Worry About…

Networking
  • Automatic DNS Configuration
    kubectl get services -n openfaas -o wide
    
Farming / Clustering
  • Which node runs what?
Low-Level Docker Commands
  • Just specify the image and tag
Monitoring
  • Liveness / Readiness / Startup Probes
  • Automatica Failover
Auto-Scaling
  • You can configure your system to spin up more pods based on conditions
  • It's called a Horizontal Pod Autoscaler

Gripe Time

What Could Be Better?

Persistent Storage is Weird and Difficult
  • Very vendor-centric
  • You get the impression that you have to use S3 or distributed storage but you can still use NFS :^D
  • Not fleshed out as well as the other Kubernetes primitives
Load Balancing is Vendor-Specific
  • Every vendor handles load-balancing in a unique way
Ingress Configuration Is Very Vendor Specific
  • You have to change your config based on your brand of ingress

Resources

Books

Kubernetes Up and Running

  • A little dated but free and a good start on the basics

Running Kubernetes…

On Your Laptop!

On Your Rasperry Pi!

On Your x64 Home Lab!

In the Cloud!

The ones I've tried in my order of preference:

  • Digital Ocean
  • Linode
  • Google
  • Lots of others (AWS, Azure, etc.)

Questions?

Thank you!