This project demonstrates how to dynamically scale Kubernetes deployments (specifically Jupyter notebooks) using Kafka metrics and KEDA (Kubernetes Event-driven Autoscaler).
-
Clone the repository or copy the scripts into your working directory.
-
Install Python dependencies:
pip3 install pyyaml jinja2
-
Run the main script:
python main.py
-
During execution:
- If not connected to a Kubernetes cluster, you will be prompted for your
kubeconfigfile path. - The script performs the following tasks:
- Sets up KEDA in the
kedanamespace - Deploys a Jupyter notebook as a
DeploymentandService - Creates a KEDA ScaledObject to scale based on Kafka lag
- Verifies the health of the deployment
- Sets up KEDA in the
- If not connected to a Kubernetes cluster, you will be prompted for your
- Refer to
USAGE_GUIDE.txtfor complete instructions, architecture overview, and command references. - You can find useful Kafka CLI commands in
important_commands.txt.


