Distributed load testing using Kubernetes with k6 (k6 Office Hours #72)

Distributed load testing using Kubernetes with k6 (k6 Office Hours #72)

Nov 19, 2022

We demonstrate how to run distributed load testing using Kubernetes with k6 and k6 operator. k6 can already run up to 40,000 virtual users from a single load generator, but if you want to scale that up further, you can use the Kubernetes operator to create a k6 custom resource within your cluster.

k6-operator repo: https://github.com/grafana/k6-operator
Paul's CNCF talk on how to use k6 operator: https://www.youtube.com/watch

Contact Nicole:
Twitter: https://twitter.com/n_vanderhoeven
Site: https://nicolevanderhoeven.com

Contact Paul:
Twitter: https://twitter.com/javaducky
Site: https://javaducky.com/

Learn more about k6:
Website: https://k6.io
Repo: https://github.com/k6io/k6

0:00 Introduction

1:12 What is an Operator?

2:25 Why do we want Custom Resources?

3:45 What is k6-operator?

5:50 What we'll demonstrate

7:20 Advantages of k6-operator

9:52 Why run k6 within Kubernetes?

14:20 It's demo time!

17:20 Build custom k6 image in Docker

19:57 Running k6 as a Docker container

21:30 Create a local k8s cluster with k3d

22:35 Install k6-operator into k8s

23:55 Create Namespace, ConfigMaps, and Secrets

28:40 Review k6 Custom Resource Definition

38:30 Triggering distributed tests with Grafana output

52:27 Triggering distributed tests with k6 Cloud output
1:00:42 Where to go next?
1:01:40 Closing