You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Kubernetes/Kubernetes Workshop/Autoscaling in Kubernetes

From Wikitech-static
< Kubernetes‎ | Kubernetes Workshop
Revision as of 19:25, 14 June 2022 by imported>Mbaoma
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

At the end of this module, you should be able to:

  • Define Autoscaling.
  • Set up Horizontal Pod Autoscaling (HPA)

Hands-on Demo: Horizontal Pod Autoscaling (HPA)

Kubernetes has basic autoscaling built-in with the Horizontal Pod Autoscaling capability. Using the official docs you will run a demo where you scale a sample application using HPA.

Checking YAML There are several ways to validate the syntax of the K8s YAML files. The kubeval program contains the basic K8s syntax, and kube-score offers a more opinionated take. Other options, such as Polaris, have a base set of rules but can be easily extended with custom rules (you want to limit repository usage to only approved repositories).

minikube Dashboard and Lens

minikube dashboard is a web-based Kubernetes user interface. While Lens provides you with an opportunity to gain insight into clusters.

Shutdown all services and deployments and stop minikube at the end of this workshop module. <syntaxhighlight lang="bash"> $ minikube stop <syntaxhighlight>

Next Module

Module 5: Refactoring code using Kubernetes features

Previous Module

Module 3: Setting up Infrastructure as Code (IaC) in Kubernetes