Url Shortener System Design Implementation - Part 2

So the next steps after generating tests and testing the application is as follows - Build Dockerfile for the app and run the app locally with redis and mongodb running locally or via docker After testing them locally, run them inside docker-compose to understand docker networking and DNS resolution Build docker images with proper tags to be used for kubernetes deployment and upload to Dockerhub Install minikube and run it locally Generate YAML files for MongoDB and Redis with deployment and services configuration and run them stateless Note their FQDN <service>.<namespace>.svc.cluster.local and add them as K8s env variables to be used Create YAML file for FastAPI application with environment set and with deployment, service and ingress and apply it Check the application running and access it via command minikube tunnel Deploying to local Kubernetes Make sure to install minikube as per their documentation - https://minikube.sigs.k8s.io/docs/start/?arch=%2Fwindows%2Fx86-64%2Fstable%2F.exe+download ...

December 3, 2024 · 9 min

Kubernetes Volumes Deep Dive

References https://stackoverflow.com/questions/45511339/kubernetes-minikube-with-local-persistent-storage https://platform9.com/blog/tutorial-dynamic-provisioning-of-persistent-storage-in-kubernetes-with-minikube/ https://stackoverflow.com/questions/66355331/deployment-cannot-find-pvc-on-minikube minikube supports hostPath mount out of box - minikube mount D:/vscode/devops:/usr/volume kubectl api-resources --namespaced=false # returns resources which are cluster-wide kubectl api-resources --namespaced=true # resources which are ns scoped PVCs request from storage classes - https://kubernetes.io/docs/concepts/storage/storage-classes/ PVC are ns scoped so 2 pvc can have same name if in different ns. for minikube generate another storage class as classic uses a specific path Setting up own PV and VPC For creating own pv, pvc you need to create a storage class as well as only then it will use the pv you creted otherwise will create dynamic allocation. ...

September 13, 2024 · 10 min