https://github.com/udhos/hpademo
hpademo is a simple demo for Kubernetes Horizontal Pod Autoscaler (HPA), written in Go and compiled to WebAssembly in order to run in a web browser.
https://github.com/udhos/hpademo
go golang hpa kubernetes wasm webassembly
Last synced: 8 months ago
JSON representation
hpademo is a simple demo for Kubernetes Horizontal Pod Autoscaler (HPA), written in Go and compiled to WebAssembly in order to run in a web browser.
- Host: GitHub
- URL: https://github.com/udhos/hpademo
- Owner: udhos
- License: mit
- Created: 2025-10-28T00:00:21.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-12T21:01:23.000Z (8 months ago)
- Last Synced: 2025-11-12T23:11:15.802Z (8 months ago)
- Topics: go, golang, hpa, kubernetes, wasm, webassembly
- Language: Go
- Homepage:
- Size: 6.67 MB
- Stars: 13
- Watchers: 0
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/udhos/hpademo/blob/main/LICENSE)
[](https://goreportcard.com/report/github.com/udhos/hpademo)
[](https://pkg.go.dev/github.com/udhos/hpademo)
# hpademo
`hpademo` is a simple demo for Kubernetes Horizontal Pod Autoscaler (HPA), written in Go and compiled to WebAssembly in order to run in a web browser.
Online demo: [https://udhos.github.io/hpademo/www/](https://udhos.github.io/hpademo/www/)
# features
- Simulate HPA based on CPU.
- Chart for number of replicas.
- Chart for per-pod CPU usage.
- Chart for total unmet CPU load.
- Dark/light modes.
- Customizable:
- Inject total CPU usage.
- POD CPU request.
- POD CPU limit.
- HPA min replicas.
- HPA max replicas.
- HPA targe cpu utilization percentage.
- Chart data history size (300s default).
- Scale down stabilization window (300s default).
- POD startup time.
- POD stop time.
- Non-customizable:
- 10% HPA Scale Tolerance.
- 15s HPA Scale Period.
# clone
```bash
git clone https://github.com/udhos/hpademo
cd hpademo
```
# edit
Set `GOOS=js GOARCH=wasm` before starting your editor/IDE.
```bash
export GOOS=js GOARCH=wasm
code .
```
# test
```bash
./test.sh
```
# build
```bash
./build.sh
```
# run
```bash
./run-serve-www.sh
```
Then open your web browser at http://localhost:8080