class: title, self-paced Kubernetes Mastery<br/> .nav[*Self-paced version*] .debug[ ``` ``` These slides have been built from commit: b26c1ef [shared/title.md](https://github.com/BretFisher/kubernetes-mastery/tree/mastery/slides/shared/title.md)] --- class: title, in-person Kubernetes Mastery<br/><br/></br> .footnote[ **Course: http://www.kubernetesmastery.com** **Slides: https://slides.kubernetesmastery.com** ] .debug[[shared/title.md](https://github.com/BretFisher/kubernetes-mastery/tree/mastery/slides/shared/title.md)] --- name: toc-chapter-1 ## Chapter 1 - [A brief introduction](#toc-a-brief-introduction) - [Pre-requirements](#toc-pre-requirements) .debug[(auto-generated TOC)] --- name: toc-chapter-2 ## Chapter 2 - [What and why of orchestration](#toc-what-and-why-of-orchestration) - [Kubernetes concepts](#toc-kubernetes-concepts) .debug[(auto-generated TOC)] --- name: toc-chapter-3 ## Chapter 3 - [Getting a Kubernetes cluster for learning](#toc-getting-a-kubernetes-cluster-for-learning) - [Docker Desktop (Windows 10/macOS)](#toc-docker-desktop-windows-macos) - [minikube (Windows 10 Home)](#toc-minikube-windows--home) - [MicroK8s (Linux)](#toc-microks-linux) - [Web-based options](#toc-web-based-options) - [`shpod`: For a consistent Kubernetes experience ...](#toc-shpod-for-a-consistent-kubernetes-experience-) .debug[(auto-generated TOC)] --- name: toc-chapter-4 ## Chapter 4 - [First contact with `kubectl`](#toc-first-contact-with-kubectl) - [Running our first containers on Kubernetes](#toc-running-our-first-containers-on-kubernetes) - [Accessing logs from the CLI](#toc-accessing-logs-from-the-cli) - [Assignment 1: first steps](#toc-assignment--first-steps) .debug[(auto-generated TOC)] --- name: toc-chapter-5 ## Chapter 5 - [Exposing containers](#toc-exposing-containers) - [Kubernetes network model](#toc-kubernetes-network-model) - [Assignment 2: more about deployments](#toc-assignment--more-about-deployments) .debug[(auto-generated TOC)] --- name: toc-chapter-6 ## Chapter 6 - [Our sample application](#toc-our-sample-application) - [Shipping images with a registry](#toc-shipping-images-with-a-registry) - [Running DockerCoins on Kubernetes](#toc-running-dockercoins-on-kubernetes) - [Assignment 3: deploy wordsmith](#toc-assignment--deploy-wordsmith) .debug[(auto-generated TOC)] --- name: toc-chapter-7 ## Chapter 7 - [Scaling our demo app](#toc-scaling-our-demo-app) - [Deploying with YAML](#toc-deploying-with-yaml) - [The Kubernetes Dashboard](#toc-the-kubernetes-dashboard) - [Security implications of `kubectl apply`](#toc-security-implications-of-kubectl-apply) - [Daemon sets](#toc-daemon-sets) - [Labels and selectors](#toc-labels-and-selectors) - [Assignment 4: custom load balancing](#toc-assignment--custom-load-balancing) .debug[(auto-generated TOC)] --- name: toc-chapter-8 ## Chapter 8 - [Authoring YAML](#toc-authoring-yaml) - [Using server-dry-run and diff](#toc-using-server-dry-run-and-diff) - [Rolling updates](#toc-rolling-updates) - [Healthchecks](#toc-healthchecks) .debug[(auto-generated TOC)] --- name: toc-chapter-9 ## Chapter 9 - [Managing configuration](#toc-managing-configuration) .debug[(auto-generated TOC)] --- name: toc-chapter-10 ## Chapter 10 - [Exposing HTTP services with Ingress resources](#toc-exposing-http-services-with-ingress-resources) - [Ingress in action: NGINX](#toc-ingress-in-action-nginx) - [Swapping NGINX for Traefik](#toc-swapping-nginx-for-traefik) .debug[(auto-generated TOC)] --- name: toc-chapter-11 ## Chapter 11 - [Volumes](#toc-volumes) - [Stateful sets](#toc-stateful-sets) - [Running a Consul cluster](#toc-running-a-consul-cluster) - [Persistent Volumes Claims](#toc-persistent-volumes-claims) - [Local Persistent Volumes](#toc-local-persistent-volumes) .debug[(auto-generated TOC)] --- name: toc-chapter-12 ## Chapter 12 - [Kustomize](#toc-kustomize) - [Managing stacks with Helm](#toc-managing-stacks-with-helm) - [Helm chart format](#toc-helm-chart-format) - [Creating a basic chart](#toc-creating-a-basic-chart) - [Creating better Helm charts](#toc-creating-better-helm-charts) - [Helm secrets](#toc-helm-secrets) .debug[(auto-generated TOC)] --- name: toc-chapter-13 ## Chapter 13 - [Extending the Kubernetes API](#toc-extending-the-kubernetes-api) - [Operators](#toc-operators) - [Owners and dependents](#toc-owners-and-dependents) .debug[(auto-generated TOC)] --- name: toc-chapter-14 ## Chapter 14 - [Centralized logging](#toc-centralized-logging) - [Collecting metrics with Prometheus](#toc-collecting-metrics-with-prometheus) .debug[(auto-generated TOC)] --- name: toc-chapter-15 ## Chapter 15 - [Resource Limits](#toc-resource-limits) - [Defining min, max, and default resources](#toc-defining-min-max-and-default-resources) - [Namespace quotas](#toc-namespace-quotas) - [Limiting resources in practice](#toc-limiting-resources-in-practice) - [Checking pod and node resource usage](#toc-checking-pod-and-node-resource-usage) .debug[(auto-generated TOC)] --- name: toc-chapter-16 ## Chapter 16 - [Cluster sizing](#toc-cluster-sizing) - [The Horizontal Pod Autoscaler](#toc-the-horizontal-pod-autoscaler) .debug[(auto-generated TOC)] --- name: toc-chapter-17 ## Chapter 17 - [Declarative vs imperative](#toc-declarative-vs-imperative) - [Kubernetes Management Approaches](#toc-kubernetes-management-approaches) - [Recording deployment actions](#toc-recording-deployment-actions) - [Git-based workflows](#toc-git-based-workflows) .debug[(auto-generated TOC)] --- name: toc-chapter-18 ## Chapter 18 - [Building images with the Docker Engine](#toc-building-images-with-the-docker-engine) - [Building images with Kaniko](#toc-building-images-with-kaniko) .debug[(auto-generated TOC)] --- name: toc-chapter-19 ## Chapter 19 - [Building our own cluster](#toc-building-our-own-cluster) - [Adding nodes to the cluster](#toc-adding-nodes-to-the-cluster) - [API server availability](#toc-api-server-availability) - [Static pods](#toc-static-pods) .debug[(auto-generated TOC)] --- name: toc-chapter-20 ## Chapter 20 - [Owners and dependents](#toc-owners-and-dependents) - [Exposing HTTP services with Ingress resources](#toc-exposing-http-services-with-ingress-resources) - [Upgrading clusters](#toc-upgrading-clusters) - [Backing up clusters](#toc-backing-up-clusters) - [The Cloud Controller Manager](#toc-the-cloud-controller-manager) .debug[(auto-generated TOC)] --- name: toc-chapter-21 ## Chapter 21 - [Namespaces](#toc-namespaces) - [Controlling a Kubernetes cluster remotely](#toc-controlling-a-kubernetes-cluster-remotely) - [Accessing internal services](#toc-accessing-internal-services) - [Accessing the API with `kubectl proxy`](#toc-accessing-the-api-with-kubectl-proxy) .debug[(auto-generated TOC)] --- name: toc-chapter-22 ## Chapter 22 - [The Container Network Interface](#toc-the-container-network-interface) - [Interconnecting clusters](#toc-interconnecting-clusters) .debug[(auto-generated TOC)] --- name: toc-chapter-23 ## Chapter 23 - [Network policies](#toc-network-policies) - [Authentication and authorization](#toc-authentication-and-authorization) - [Pod Security Policies](#toc-pod-security-policies) - [The CSR API](#toc-the-csr-api) - [OpenID Connect](#toc-openid-connect) - [Securing the control plane](#toc-securing-the-control-plane) .debug[(auto-generated TOC)] --- name: toc-chapter-24 ## Chapter 24 - [Next steps](#toc-next-steps) - [Links and resources](#toc-links-and-resources) .debug[(auto-generated TOC)] .debug[[shared/toc.md](https://github.com/BretFisher/kubernetes-mastery/tree/mastery/slides/shared/toc.md)] --- class: pic .interstitial[] --- name: toc-a-brief-introduction class: title A brief introduction .nav[ [Previous section](#toc-) | [Back to table of contents](#toc-chapter-1) | [Next section](#toc-pre-requirements) ] .debug[(automatically generated title slide)] --- # A brief introduction - This was initially written by [Jérôme Petazzoni](https://twitter.com/jpetazzo) to support in-person, instructor-led workshops and tutorials - Credit is also due to [multiple contributors](https://github.com/BretFisher/kubernetes-mastery/graphs/contributors) — thank you! - I recommend using the Slack Chat to help you ... - ... And be comfortable spending some time reading the Kubernetes [documentation](https://kubernetes.io/docs/) ... - ... And looking for answers on [StackOverflow](http://stackoverflow.com/questions/tagged/kubernetes) and other outlets .debug[[k8smastery/intro.md](https://github.com/BretFisher/kubernetes-mastery/tree/mastery/slides/k8smastery/intro.md)] --- ## Hands on, you shall practice - Nobody ever became a Jedi by spending their lives reading Wookiepedia - Likewise, it will take more than merely *reading* these slides to make you an expert - These slides include *tons* of exercises and examples - They assume that you have access to a Kubernetes cluster .debug[[k8smastery/intro.md](https://github.com/BretFisher/kubernetes-mastery/tree/mastery/slides/k8smastery/intro.md)] --- class: pic .interstitial[] --- name: toc-pre-requirements class: title Pre-requirements .nav[ [Previous section](#toc-a-brief-introduction) | [Back to table of contents](#toc-chapter-1) | [Next section](#toc-what-and-why-of-orchestration) ] .debug[(automatically generated title slide)] --- # Pre-requirements - Be comfortable with the UNIX command line - navigating directories - editing files - a little bit of bash-fu (environment variables, loops) - Some Docker knowledge - `docker run`, `docker ps`, `docker build` - ideally, you know how to write a Dockerfile and build it <br/> (even if it's a `FROM` line and a couple of `RUN` commands) - It's totally OK if you are not a Docker expert! .debug[[k8smastery/prereqs.md](https://github.com/BretFisher/kubernetes-mastery/tree/mastery/slides/k8smastery/prereqs.md)] --- class: title *Tell me and I forget.* <br/> *Teach me and I remember.* <br/> *Involve me and I learn.* Misattributed to Benjamin Franklin [(Probably inspired by Chinese Confucian philosopher Xunzi)](https://www.barrypopik.com/index.php/new_york_city/entry/tell_me_and_i_forget_teach_me_and_i_may_remember_involve_me_and_i_will_lear/) .debug[[k8smastery/prereqs.md](https://github.com/BretFisher/kubernetes-mastery/tree/mastery/slides/k8smastery/prereqs.md)] --- ## Hands-on exercises - The whole workshop is hands-on, with "exercies" - You are invited to reproduce these exercises with me - All exercises are identified with a dashed box *plus* keyboard icon .exercise[ - This is the stuff you're supposed to do! - Go to https://slides.kubernetesmastery.com to view these slides - Join the chat room: [Slack](https://chat.bretfisher.com/) <!-- ```open https://slides.kubernetesmastery.com``` --> ] .debug[[k8smastery/prereqs.md](https://github.com/BretFisher/kubernetes-mastery/tree/mastery/slides/k8smastery/prereqs.md)] --- class: pic .interstitial[] --- name: toc-what-and-why-of-orchestration class: title What and why of orchestration .nav[ [Previous section](#toc-pre-requirements) | [Back to table of contents](#toc-chapter-2) | [Next section](#toc-kubernetes-concepts) ] .debug[(automatically generated title slide)] --- # What and why of orchestration - There are many computing orchestrators - They make decisions about when and where to