Complete Helm Chart repository for deploying the Terminfinder to any kubernetes cluster (via Helm).
These Helm charts are not compatible with Kubernetes <1.23, if you are enabling autoscaling.
It's recommended to use a dedicated PostgreSQL instance for production usage.
- install and run minikube or other local K8s services https://kubernetes.io/docs/tasks/tools/
- use scripts in installation below
$ minikube addons enable ingress
$ minikube tunnel
- It's recommended to work with an ingress configuration, use
values.yaml
config for that. - To use the ingress configuration, you need an ingress controller ( e.g. Nginx Ingress Controller)
- It's recommended to use a TLS connection at the ingress, therefore use the
tls
option in the Ingress definition. - For usage of the TLS, you need to attach either manually an TLS cert via a secret, or use cert-manager for managing it via a cert-issuer (e.g. let's-encrypt).
- For communication between backend and postgres, we use a DNS entry. If you use Incluster-PostgreSQL instance, you need CoreDNS.
- For production usage, may use an own postgres instance. (Recommended, use the Cloud Native PG Operator in Kubernetes)
- Prepare the value files.
- Install the helm charts with
helm install ...
CLI Command:
$ helm upgrade --install -n tf --create-namespace tf1 terminfinder-chart
$ helm list -n tf
$ kubectl get pod,deploy,pvc,svc,ing,ep -n tf
$ kubectl run -i --tty --rm debug --image=busybox -n terminfinder-demo --restart=Never
To delete the helm chart (release), use the helm uninstall...
command.
Note that the persistent volume may be available even if the helm release is uninstalled.
$ helm uninstall tf1 -n tf
$ kubectl delete pvc --all -n tf
$ kubectl delete namespace tf
The helm chart deployment of the terminfinder-frontend
will be kept untouched.
By default, an own instance of postgres is installed with the terminfinder-backend
chart. You can disable by adding
the following configuration to you values.yaml
of the backend helm installation:
postgresql:
enabled: false
# Or configure it with the docs here:
# https://github.com/bitnami/charts/tree/main/bitnami/postgresql#parameters
Additionally, you should store credentials (of db user password) into a secret like that:
apiVersion: v1
kind: Secret
metadata:
name: terminfinder-backend-custom-postgresql
namespace: terminfinder-demo
labels:
app.kubernetes.io/name: postgresql
type: Opaque
data:
customPasswordKey: "eW91LWtub3ctaG93LWl0LXdvcmtzLSN0aGVsw6RuZAo="
With this secret already deployed, you can modify the helm chart deployment of the terminfinder-backend
on these
values:
global:
postgresql:
auth:
username: <your-custom-username>
# password: this-is-not-secure-for-production!
database: <your-custom-database>
existingSecret: terminfinder-backend-custom-postgresql # or how you secret is called
secretKeys:
userPasswordKey: customPasswordKey # the key of the secret, where the password is saved