Skip to content

mate-academy/devops_todolist_kubernetes_task_11_controlling_scheduling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django ToDo list

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:

Explore

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.

Task

Create a Kubernetes manifest for a pod which will contain a ToDo app container:

  1. Fork this repository.
  2. Use kind to spin up a cluster from a cluster.yml configuration file.
  3. Inspect Nodes for Labels and Taints
  4. Taint nodes labeled with app=mysql with app=mysql:NoSchedule
  5. StateFulSet requirements:
    1. Modify StatefulSet so it can be scheduled on the tainted worker nodes
    2. Add Pod Anti-Affinity rule so MySQL could not be scheduled on the same node
    3. Add Node Affinity rule so mysql scheduled on a node with the app=mysql label
  6. Deployment requirements:
    1. Add Node Affinity Rules to schedule deployment on an app=todoapp labeled nodes (Use PreferedDuringSchedulingIgnoredDuringExecution)
    2. Add Pod Anti-Affinity rule so deployment could not be scheduled on the same node
  7. bootstrap.sh should contain all the commands to deploy all the required resources in the cluster
  8. Create the INSTRUCTION.md file with detailed instructions on how to validate the changes
  9. Create PR with your changes and attach it for validation on a platform.