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 nginx deployment on nodeport

Here is guide how you can easily deploy nginx web server on minikube locally with common kubernetes terms explaied as well in the tutorial. Nginx Deployment apiVersion: apps/v1 kind: Deployment metadata: name: my-nginx-deployment spec: replicas: 3 selector: matchLabels: app: nginx-deployment template: metadata: labels: app: nginx-deployment spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80 protocol: TCP resources: limits: cpu: "500m" # 500 milliCPU (0.5 CPU) memory: "512Mi" # 512 Mebibytes requests: cpu: "200m" # 200 milliCPU (0.2 CPU) memory: "256Mi" # 256 Mebibytes Note - we have to use apps/v1 for Deployment and metadata is very important. The name nginx-deployment in metadata refers to name of deployment. ...

September 21, 2024 · 3 min