Edit Page

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:

  • kubectl
  • Helm
  • Curl, or some similar program to make HTTP requests from the command line

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 clusters
    • kubens 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 and helm commands.

Steps to set up Kubernetes

First, record your site and environment. Then, follow these steps.

  1. 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.

  2. Set this namespace as a default with

    kubectl config set-context --current --namespace=libre
    

    Alternatively, you can modify the kube config file or use the kubens tool.

  3. Add the Helm repository:

    helm repo add \
         --username <EMAIL_ADDRESS> \
         --password <ACCESS_TOKEN> \
         libre \
    <REPO>
    
  4. 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
    
  5. Add the Bitnami Helm repository:

    helm repo add bitnami https://charts.bitnami.com/bitnami
    
  6. Pull the build template repository (we will supply this).

  7. Update overrides to keycloak.yaml. Then install with this command:

    helm install keycloak -f ./keycloak.yaml bitnami/keycloak -n libre
    
  8. Set up port forwarding from Keycloak. For example, this forwards traffic to port 5101 on localhost

    kubectl port-forward  svc/keycloak 5101:80
    

Next steps

  1. Configure Keycloak
  2. Install services.