This repository refers to the freeCodeCamp.org hands-on tutorial about microservices architecture and distributed systems using below frameworks and tools:
- Kubernetes
- Docker
- Flask
- Mysql
- Mongo
- Celery (Redis as a broker)
The application has been divided into chunks:
- Auth
- Converter
- Notification
Kubernetes component division:
- Flask Auth Microservice
- Flask Converter Microservice
- Flask Notification Microservice
- MySQL Microservice
- Mongo Microservice
- Celery Microservice
- Clone repo
- Install colima (ps. I have used colima as docker runner instead docker desktop, you can use any alternative to run docker locally.)
- Install Kubernetes
- Install MiniKube
- Run
colima start
orcolima start --cpu 4 --memory --8
(you can set up cpu and memory according to your system's specifications) - Run
minikube start
- Go inside each application's manifest folder
- Run
kubectl apply -f ./
- Run
- To set up mysql user and database for the first time
- Get inside mysql pod using
k exec -it podname sh
- Run
mysql -p
- Insert password
root
- Inside mysql shell run commands which are defined in auth/init.sql file.
- Get inside mysql pod using
- to bind port externally to send API using curl or postman:
- Run
minikube service service_name --url localhost:port_number
- Run
Special note: If you're interested in running this project using docker, If you are new to docker and willing to learn docker first, then you can also run it using docker directly.
Docker Repo & Postman Collection can be found here.
If you're interested in learning kubernetes by reading a book, Kubernetes Book can be a good resource to start as a beginner.