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
kubectx
to manage multiple clusterskubens
to 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
kubectl
andhelm
commands.
Steps to set up Kubernetes
First, record your site and environment. Then, follow these steps.
Create a namespace called libre.
kubectl create ns libre
Confirm it works with
kubectl get ns
.On success, the output shows an active
libre
namespace.Set this namespace as a default with
kubectl config set-context --current --namespace=libre
Alternatively, you can modify the kube
config
file or use thekubens
tool.Add the Helm repository:
helm repo add \ --username <EMAIL_ADDRESS> \ --password <ACCESS_TOKEN> \ libre \ <REPO>
Create the container image pull secret:
kubectl create secret docker-registry libre-registry-credential \ --docker-server=<DOCKER_SERVER> \ ## the repository --docker-password= <ACCESS_TOKEN> \ --docker-email= <EMAIL_ADDRESS>
Confirm the secrets with this command:
kubectl get secrets
Add the Bitnami Helm repository:
helm repo add bitnami https://charts.bitnami.com/bitnami
Pull 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
Set up port forwarding from Keycloak. For example, this forwards traffic to port
5101
onlocalhost
kubectl port-forward svc/keycloak 5101:80