- Minikube (local kubernetes) started
- Helm installed
- Bitnami repo added in Helm
Warning: Ensure you are in the
deploy
folder before running the following commands.
helm install ubik-postgres bitnami/postgresql -f ./postgresql/values-dev.yaml
helm install ubik-rabbitmq bitnami/rabbitmq -f ./rabbitmq/values-dev.yaml
Normal ingress will not work if you use wsl.
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm upgrade --install ingress-nginx ingress-nginx/ingress-nginx --set controller.config.allow-snippet-annotations="true"
kubectl create secret generic realm-secret --from-file=../tests/Ubik.Api.Tests.Integration/import/ubik-realm.json
Dont'forget to reload it if you change some configs.
Look at the command when you created your postges via helm. It can change because I use the last bitnami img (version chan change). But you know....
Export your password
export POSTGRES_PASSWORD=$(kubectl get secret --namespace default ubik-postgres-postgresql -o jsonpath="{.data.postgres-password}" | base64 -d)
Run postgres client
kubectl run ubik-postgres-postgresql-client --rm --tty -i --restart='Never' --namespace default --image docker.io/bitnami/postgresql:17.0.0-debian-12-r9 --env="PGPASSWORD=$POSTGRES_PASSWORD" \
--command -- psql --host ubik-postgres-postgresql -U postgres -d postgres -p 5432
Create the db
CREATE DATABASE keycloak;
Contains config to access the already existing postgres db
helm install keycloak-local bitnami/keycloak -f ./keycloack/values-dev.yaml
To remember the commands only (you can skip this part):
openssl req -newkey rsa:2048 -nodes -keyout tls.key -out tls.csr
openssl x509 -req -sha256 -days 365 -in tls.csr -signkey tls.key -out tls.crt
kubectl apply -f ./keycloack/ingress-for-keycloack.yaml
helm install ubik-cache bitnami/redis -f ./redis/values-dev.yaml
Build image
docker build -t ubik-accounting-structure-api-test:latest -f ../src/Ubik.Accounting.Structure.Api/Dockerfile ../
Load image in minikube
minikube image load ubik-accounting-structure-api-test:latest
Apply deployement
kubectl apply -f ./accounting-structure-api/accounting-structure-api-deploy.yaml
Build image
docker build -t ubik-accounting-tx-api-test:latest -f ../src/Ubik.Accounting.Transaction.Api/Dockerfile ../
Load image in minikube
minikube image load ubik-accounting-tx-api-test:latest
Apply deployement
kubectl apply -f ./accounting-transaction-api/accounting-transaction-api-deploy.yaml
Build image
docker build -t ubik-accounting-sales-vat-tax-api-test:latest -f ../src/Ubik.Accounting.SalesOrVatTax.Api/Dockerfile ../
Load image in minikube
minikube image load ubik-accounting-sales-vat-tax-api-test:latest
Apply deployement
kubectl apply -f ./accounting-tax-api/accounting-tax-api-deploy.yaml
Build image
docker build -t ubik-security-api-test:latest -f ../src/Ubik.Security.Api/Dockerfile ../
Load image in minikube
minikube image load ubik-security-api-test:latest
Apply deployement
kubectl apply -f ./security-api/security-api-deploy.yaml
Build image
docker build -t ubik-proxy-test:latest -f ../src/Ubik.YarpProxy/Dockerfile ../
Load image in minikube
minikube image load ubik-proxy-test:latest
Apply deployement
kubectl apply -f ./ubik-proxy/proxy-api-deploy.yaml
Build image
docker build -t ubik-webapp-test:latest -f ../src/Ubik.Accounting.WebApp/Dockerfile ../
Load image in minikube
minikube image load ubik-webapp-test:latest
Apply deployement
kubectl apply -f ./ubik-webapp/webapp-deploy.yaml
- 127.0.0.1 keycloak-local
- 127.0.0.1 ubik-proxy
- 127.0.0.1 ubik-webapp
It will open your nginx/ingress services to your local host.
minikube tunnel
After all this configuration, now, you can access backend Swagger here:
and the Blazor webapp here: