Welcome to your home assignment! Your task is to deploy the ![Fox] app and configure it to autoscale using Kubernetes Event-Driven Autoscaling (KEDA). You'll need to integrate the "Counter" service to drive the autoscaling mechanism, ensuring the Fox app scales efficiently. We look forward to seeing your innovative solutions and approach to this challenge. Good luck!
Service has 3 endpoints:
http://<service_name>/
- returns JSON object, which could be used for scaling using KEDA Metric API Scalerhttp://<service_name>/plusone
- increments the Foxes Counter by onehttp://<service_name>/reset
- resets the Foxes Counter
Here is an example of service usage (assuming it's available on localhost
port 8000
):
> curl http://localhost:8000/
{"components": {"foxes": {"count": 0.0}}}
> curl http://localhost:8000/plusone
Hi, fox! Fox counter increased by one
> curl http://localhost:8000/
{"components": {"foxes": {"count": 1.0}}}
> curl http://localhost:8000/reset
Fox counter was reset
> curl http://localhost:8000/
{"components": {"foxes": {"count": 0.0}}}
- Clone the repo
- Build an Image for
counter
Python App /src/main.py (Push the Docker image to any Docker registry of your choice) - create Kubernetes manifests, as follows:
- Deployment for
counter
indefault
namespace - Service for the
counter
Deployment indefault
namespace
- Deployment for
- Deploy the fox app using a Kubernetes deployment. You can use any simple application, such as Nginx or HelloWorld, to fulfill this requirement.
- After both the Deployment and Service were deployed - it's time to deploy KEDA
- Create and deploy an ![HPA] -
add link
object using KEDA and Metric API Scaler- Scaling of the fox app should be based on the
count
JSON field from thecounter
service -http://<service_name>/
- Check if the scaling of the fox app is properly working using GET requests to the
counter
Service endpoints:http://<service_name>/plusone
to check Scale Uphttp://<service_name>/reset
to check Scale Down
- Scaling of the fox app should be based on the
- Helm (include chart directory, templates, values.yaml, Chart.yaml)
- Kustomize (include Kustomization.yaml, overlays, base configurations) Thank you!
Please submit your assignment as an archive (.zip or .tar.gz) including:
- Kubernetes deployment files
- Dockerfile
- Any notes
Good Luck!