This guide provides instructions for building Docker images and deploying them using Kubernetes.
To build the Docker image for FastAPI, use the following command:
docker build -t fastapi-image:latest .
To build the Docker image for Celery worker, use the following command:
docker build -t celery-worker:latest .
Apply the following Kubernetes manifests to deploy your application and services:
kubectl apply -f deployInflux.yaml
kubectl apply -f deployrabbitmq.yaml
kubectl apply -f deployraddis.yaml
kubectl apply -f deployfastapi.yaml
kubectl apply -f deploycelery.yaml
-
To switch Docker environment settings to Minikube, use:
eval $(minikube docker-env -u)
-
To view logs for a specific pod in a namespace, use:
kubectl logs <podname> -n namespace
deployInflux.yaml: - NodePort coule be changed to clusterIP (if no data accessed allow from outside)