This is a todo list web application with 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
Now you can browse the API or start on the landing page.
Create a kubernetes manifest for a pod which will containa 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 sensetive data from a secret:MYSQL_ROOT_PASSWORD
MYSQL_USER
MYSQL_PASSWORD
StatefulSet
pods should have alivenessProbe
andreadinessProbe
StatefulSet
pods should have arequests
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
requirments:- Update your application so it could connect to a 0 indexed db pod (mysql-0)
- Application should read db connecion information from a
Secret
:NAME
USER
PASSWORD
HOST
bootstrap.sh
should containe all the commands to deploy all the required resources in the clusterREADME.md
should have instructuions on how to validate the changes- Create PR with your changes and attach it for validation on a platform.