K Knowledge Base
Breadcrumbs

WIP: Deploying to your own Kubernetes Service

Note: The commands referenced in this document will be kubernetes cli specific but the same can be used by changing the kubectl command to oc using the openshift cli

This document is split into 2 sections:

  1. New deployment will take you through the steps to deploy K for the first time.

  2. Upgrades will take you through the steps to update your K installation.

Before you start

You should have

  1. Received a configuration package from KADA.

  2. Be familiar or be knowledgable about the network and load balancer settings for exposing services on your Kubernetes instance.

  3. Request from your network team a DNS alias and certificate for the KADA Platform.

  4. Access to an environment a Kubernetes cluster

  5. In your local environment

    1. Install kubectl

    2. Install your cloud provider cli: eg azure cli, aws cli

    3. For windows environments install gitbash.

1. New Deployments

A new deployment will take approximately 1 hour in duration to complete.

The commands in the steps below assume you are running in a unix bash env.

We strongly recommend using a Linux based environment over windows for compatibility of the deployment scripts. However windows use may run gitbash if you are deploying from a windows environment.

Step 1) Create a new Kubernetes cluster.

Kubernetes Service Providers supported: Amazon's Elastic Kubernetes Service (EKS) & Microsoft Azure's Kubernetes Service (AKS). Our customers have deployed onto Openshift Kubernetes Service. Reach out for assistance with other Kubernetes options that are not listed.

For cluster requirements see the How to deploy on your cloud page.

Step 2) Setting up access to KADA Image repository

KADA will provide a KADA_CLIENT_ID and KADA_CLIENT_SECRET to access the KADA Image repository.

kubectl create secret docker-registry kada-image-credentials \
    --docker-server=kadaexternal.azurecr.io \
    --docker-username=$KADA_CLIENT_ID \
    --docker-password=$KADA_CLIENT_SECRET
kubectl patch serviceaccount <the service_account or "default"> \
  -p "{\"imagePullSecrets\": [{\"name\": \"kada-image-credentials\"}]}"

Step 3) Creating a certificate

Raise a certificate request for the domain hosting the K Platform. Generate a full chain certificate.

kubectl create secret tls kada-ssl-cert --cert /path/to/fullchain.cer --key /path/to/certificate.key

Step 4) Kubernetes ingress

List on *:8080

/keycloak -> keycloak-cluster-ip-service.<REPLACE WITH PROJECT NAMESPACE>.svc.cluster.local:8080 
/api -> cerebrum-cluster-ip-service.<REPLACE WITH PROJECT NAMESPACE>.svc.cluster.local:5002
/solr -> solr-gatekeeper-cluster-ip-service.<REPLACE WITH PROJECT NAMESPACE>.svc.cluster.local:8888
/ -> cortex-cluster-ip-service.<REPLACE WITH PROJECT NAMESPACE>.svc.cluster.local:9002

Step 5) Deploying KADA Services into Kubernetes

  1. Download and unzip: unzip kada_x.x.x.zip

  2. Navigate: cd d_pkg/kube_setup

  3. Populate k8s_env.sh, then run ./kada_gen.sh

  4. Deploy: kubectl apply -f generated-k8s-common

  5. Deploy platform: kubectl apply -f master.yaml

  6. Modify PV Policy to Retain:

kubectl get pv
kubectl patch pv <pv name> -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'

Step 6) Post deployment verification

kubectl get pods
https://<YOUR DOMAIN>/api/status

Step 7) Setup Users

http://<YOUR DOMAIN>/keycloak/auth/admin/master/console/#/realms/kada

Step 8) Setup Landing Storage

AWS s3: storage_type = s3, storage_root_folder = <s3 bucket name>

Azure Blob: storage_type = azure, storage_root_folder = <Azure container name>

Performing an upgrade to your K installation

Step 1) Pre checks

Check that no jobs are currently running. Admin > Monitor.

Step 2) Deploying KADA updates

  1. Download and unzip: unzip kada_x.x.x.zip

  2. Navigate: cd d_pkg/kube_setup

  3. Populate or overwrite k8s_env.sh

  4. Deploy: kubectl apply -f master.yaml

Step 3) Post deployment verification

Follow the same verification as per New Deployments (Step 6).