Set up Kubernetes
This guide shows you how to install Rhize services on your Kubernetes cluster. You can also use this procedure as the model for an automation workflow in your CI.
Prerequisites
Before starting, ensure that you have the following technical requirements.
Software requirements:
Access requirements:
- Administrative privileges for a running Kubernetes cluster in your environment. Your organization must set this up.
- Access to Rhize Helm charts and its build repository. Rhize provides these to all customers.
Optional utilities. For manual installs, the following auxiliary tools might make the experience a little more human friendly:
Optional: kubectx utilities
kubectxto manage multiple clusterskubensto switch between and configure namespaces easily
Optional: the k8 Lens IDE, if you prefer to use Kubernetes graphically
Again, these are helpers, not requirements. You can install everything with only the
kubectlandhelmcommands.
Steps to set up Kubernetes
First, record your site and environment. Then, follow these steps.
Create a namespace called libre.
kubectl create ns libreConfirm it works with
kubectl get ns.On success, the output shows an active
librenamespace.Set this namespace as a default with
kubectl config set-context --current --namespace=libreAlternatively, you can modify the kube
configfile or use thekubenstool.Add the Rhize Helm Chart Repository:
helm repo add \ --username <EMAIL_ADDRESS> \ --password <ACCESS_TOKEN> \ libre \ https://gitlab.com/api/v4/projects/42214456/packages/helm/stableCreate the container image pull secret:
kubectl create secret docker-registry libre-registry-credential \ --docker-server=<HELM_REPOSITORY> \ --docker-password=<ACCESS_TOKEN> \ --docker-email=<EMAIL_ADDRESS>Confirm the secrets with this command:
kubectl get secretsAdd the Bitnami Helm repository:
helm repo add bitnami https://charts.bitnami.com/bitnamiAnd update repositories with:
helm repo updatePull the build template repository (we will supply this).
Update overrides to
keycloak.yaml. Then install with this command:helm install keycloak -f ./keycloak.yaml bitnami/keycloak -n libre
Note: Version may have to be specified by appending on
--versionand the desired chart version.
Set up port forwarding from Keycloak. For example, this forwards traffic to port
8080onlocalhost.kubectl port-forward svc/keycloak 8080:80 -n libre