Local builds and testing uses docker to generate the container. It is recommended that Docker Desktop is used.
Minikube is used for deploying the service to kubernetes locally.
- Install Minikube
- Start Minikube:
minikube -p minikube start --driver=docker
- Create the metalus namespace once:
kubectl create namespace metalus
- Set the default Namespace:
kubectl config set-context --current --namespace=metalus
- Make sure that containers are published to docker:
eval $(minikube -p minikube docker-env)
- Build and publish locally:
sbt clean docker:publishLocal
- Run the build steps
- Deploy the container image to minikube:
kubectl apply -f k8s/deploy-local.yml
- Setup Minikube Load Balancer (must be in a different terminal window than the minkube terminal):
minikube tunnel
- Setup the Load Balancer:
kubectl expose deployment process- --type=LoadBalancer --name=process-preview-services-lb --port=9000
Delete the local deployment: kubectl delete -f k8s/deploy-local.yml
- Show Pods -
kubectl get pods
- Show Logs -
kubectl logs <container-name>
- Pod Shell Access -
kubectl exec --stdin --tty <container-name> -- /bin/bash