This is a to-do list web application with the basic features of most web apps, i.e., accounts/login, API, and interactive UI. To do this task, you will need:
Try it out by installing the requirements (the following commands work only with Python 3.8 and higher, due to Django 4):
pip install -r requirements.txt
Create a database schema:
python manage.py migrate
And then start the server (default is http://localhost:8000):
python manage.py runserver
You can now browse the API or start on the landing page.
Create a Kubernetes manifest for a pod that will contain a ToDo app container:
- Fork this repository.
- Use
kind
to spin up a cluster from acluster.yml
configuration file. - Create a
statefulSet.yml
file forStatefulSet
to manage MySQL. StatefulSet
requirement:StatefulSet
should be deployed in amysql
namespaceStatefulSet
should have 3 replicasStatefulSet
is reading sensitive data from a secret:MYSQL_ROOT_PASSWORD
MYSQL_USER
MYSQL_PASSWORD
StatefulSet
pods should have alivenessProbe
andreadinessProbe
StatefulSet
pods should haverequests
andlimits
forCPU
andMemory
- MySQL db should be inited from an
init.sql
that should be propagated as a mounted volume in/docker-entrypoint-initdb.d
StatefulSet
should havevolumeClaimTemplates
StatefulSet
should have a headlessService
to expose db pods
Deployment
requirements:- Update your application so it can connect to a 0 indexed db pod (
mysql-0
) - The application should read db connection information from a
Secret
:NAME
USER
PASSWORD
HOST
- Update your application so it can connect to a 0 indexed db pod (
bootstrap.sh
should contain all the commands to deploy all the required resources in the clusterINSTRUCTION.md
should have instructions on how to validate the changes- Create PR with your changes and attach it for validation on a platform.