Monitor your kubernetes clusters using NeoPixel LEDS!
Currently using a Raspberry PI 4b 2GB. Preparing a Raspberry PI Zero W
NeoPixel LED Strips, 12mm Diffussed bulbs
-
cd
into project directory. -
Create a virtual environment.
$ make venv
- Activate it.
$ source venv/bin/activate
- Install development dependencies with editable mode to test the CLI.
$ make install
This will basic command line functionality
$ kubeledscli init
This will retrieve node status and set the leds base off of status of each node, testing each status condition (ready, cpu, memory, disk)
$ kubeledscli get_cluster_nodes '[api fqdn]' \
'[your token]' 'True' 'get_cluster_nodes' \
'set_leds' 'get_cluster_nodes' 'Ready' \
'set_leds' 'get_cluster_nodes' 'MemoryPressure' \
'set_leds' 'get_cluster_nodes' 'DiskPressure' \
'set_leds' 'get_cluster_nodes' 'PIDPressure' \
'set_leds' 'get_cluster_nodes' 'Ready' \
The above commands will retrieve cluster node status and set an led frame per status condition, 1 led per node.
GREEN: Node Ready BLUE: CPU Good CYAN: Memory good Purple: Disk Good
CLI commands can be tested with Docker.
-
Build an image for the CLI.
Image is tagged with the same name as the
cli_command
.
$ make docker-image
- Run the command inside the container.
$ docker-run --rm kubeledscli init
- Install documentation-related dependencies.
$ make docs
- Serve the docs locally.
$ make serve-docs
NOTE
Make sure you have account in PyPI before you try this out.
To publish you CLI to PyPI, run:
$ make distributions
dist
directory will be created inside your project directory. Upload it to PyPI using:
$ twine dist/*
For help related to make commands.
$ make help