You have to create k8s cluster
- Install Minikube:
brew install minikube
- Install kubectl:
brew install kubectl
- Start the cluster:
minikube start
git clone https://github.com/overpathz/distributed-job-processor.git
- Intermediate step. Your local Docker daemon and the Docker daemon inside Minikube are separate. By default, images built on your local machine are not available inside Minikube’s environment.
So, execute this command in your project root:eval $(minikube -p minikube docker-env)
- Build app image:
docker build -t distributed-job-processor:0.0.1 .
- Run all other services (postgres + observability stack):
docker-compose up -d
- Deploy the application to Kubernetes:
kubectl apply -f deployment.yml
- kubectl delete deployment distributed-job-processor
- kubectl logs -f (it changes dynamically)
- docker build -t distributed-job-processor:0.0.1 . (dot is current context (Dockerfile))
- docker volume list
- docker volume rm db-data
- kubectl apply -f deployment.yml
- kubectl get pods