The configuration template repository with default environment settings serving required data for k8s helm chart. It already provides the accoring k8s resources within a submodule pointing to kubernetes repository.
- Up and running kubernetes cluster (e.g. minikube)
- kubectl
- helm
- Lens (optional but recommended for having a view on k8s cluster)
- If you install the chart on a local cluster and use the default configuration make sure you have
the following local domain mappings in
/etc/hosts
(Linux) orC:\Windows\System32\drivers\etc\hosts
(Windows)
onlineberatung.localhost -> 127.0.0.1
video.onlineberatung.localhost -> 127.0.0.1
- In order to be able to pull images from docker repository you create a Kubernetes secret named registry-secret
kubectl create secret docker-registry registry-secret --docker-server=ghcr.io --docker-username=<your-github-username> --docker-password=<your-github-password> --docker-email=<your-email>
- Install the nginx Ingress Controller for Kubernetes
helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace
- Navigate to the customization folder and execute the script: for non helm managed resources
sh setup_customization_configmaps.sh <namespace> <release_name>
- Install the helm chart
helm install <release_name> k8s --wait-for-jobs -f values.yaml -f values-secrets.yaml
For local setup on a minicube cluster, two additional steps are required after installation:
- Use
minikube tunnel
on the host to access the cluster - Userservice, messageservice, and uploadservice run sidecars to set up master keys. On minikube, use
kubectl port-forward -n ingress-nginx service/ingress-nginx-controller 80:80
to forward nginx port 80 to make this work
If you are experiencing problems, we have found that a minikube with too little memory can cause various problems during installation. For this reason we recommend allocating at least 10gb of RAM.
- Make sure you have the latest changes of git submodule if you work on a branch
cd k8s
git fetch
git pull
- Execute helm upgrade
helm upgrade <release_name> k8s -f values.yaml -f values-secrets.yaml
- Make sure you have the release tag you want to deploy checked out for
cd k8s
git fetch
git checkout tags/<release_tag>
- Execute helm upgrade
helm upgrade <release_name> k8s -f values.yaml -f values-secrets.yaml
If you use computers with apple m1 chips, you'll need to build your keycloak and consulting type service image locally and use these versions.
git clone https://github.com/Onlineberatung/onlineberatung-keycloak-otp.git
cd onlineberatung-keycloak-otp
git checkout develop
git pull origin develop
mvn clean install
- In Dockerfile of the project add target folder prefix for the jar (
target/
) in the COPY line docker build . -t keycloak:dockerImage.develop.m1
Go to onlineBeratung-k8s-config/k8s/charts/keycloak/values.yaml and change the value to your custom built image version.
Repeat similar steps for consultingtype service:
git clone https://github.com/Onlineberatung/onlineBeratung-consultingTypeService.git
cd consultingTypeService
git checkout develop
git pull origin develop
mvn clean install
- In Dockerfile of the project add target folder prefix for the jar (
target/
) in the COPY line docker build . -t consultingtype-service:dockerImage.develop.m1
Go to values.yaml and change the value of consulting type service to your locally built m1 version. Perform helm upgrade as described in the previous steps.