Link Search Menu Expand Document
Start for Free

Kubernetes Installation

This page describes how to install Stardog on Kubernetes. If you want to install Launchpad and Kubernetes together, see this section.

Page Contents
  1. Overview
  2. Prerequisites
  3. Preparing the namespace
  4. Preparing manifest values
    1. Value: Memory
    2. Value: Disk
  5. Install Stardog using Helm
  6. Execute the installation
  7. Verify the installation
  8. What’s Next?

Overview

Installing Stardog with Kubernetes gives you the features of the Stardog Cluster with the infrastructure of Kubernetes.

Prerequisites

To install Stardog with Kubernetes, you will need the following:

Preparing the namespace

First, create a namespace:

kubectl create namespace stardog-ns

Then load your Stardog license file:

kubectl -n stardog-ns create secret generic stardog-license \
--from-file stardog-license-key.bin=/path/to/stardog-license-key.bin

If your license file is simply called stardog-license-key.bin, you can use: kubectl -n stardog-ns create secret generic stardog-license --from-file stardog-license-key.bin.

Preparing manifest values

Now we need to prepare the manifest to install Stardog. We have a few templates with different profiles as a starting point.

In the following sections, we will explain how to fill in these templates.

Value: Memory

Our Helm chart contains several memory-related values. Administering Stardog 101 is a good companion read to this section.

Pod:

  • resources.requests.cpu - Represents the CPU available for your pod, which should be the majority of the node’s capacity.
  • resources.requests.memory – Denotes the memory available for your pod, which should utilize most of the node’s memory.
  • resources.limits.cpu - Sets the maximum CPU Stardog can consume during bursts (range between resources.requests.cpu and total CPU).
  • resources.limits.memory - Defines the maximum memory Stardog can consume during bursts (range between resources.requests.memory and total memory).

JVM:

  • jvm.minHeap – Follow these guidelines, dependent on pod settings above.
  • jvm.maxHeap - Follow these guidelines, dependent on pod setting above.
  • jvm.directMem - Follow these guidelines, dependent on pod settings above.
  • jvm.javaArgs: "-XX:ActiveProcessorCount={CPU}" - Advisable to leave one CPU for other processes, thus resources.requests.cpu - 1.

We recommend VM nodes with no less than 8G for running Stardog. Nonetheless, smaller VMs can be used for deployment testing.

Value: Disk

Stardog requires a persistent disk, and you need to set two values for it.

DISK:

  • persistence.storageClass - The type of disk to be used. We recommend always using the fastest disk possible from your provider.
  • persistence.size – Follow these guidelines.

To keep costs low when testing your deployment mechanism, you can use the cheapest disk and 8GB.

Install Stardog using Helm

With our values.yaml setup completed, we can now proceed with the Stardog installation.

helm repo add stardog-sa https://stardog-union.github.io/helm-chart-sa/
helm repo update
helm upgrade --install dev-sd stardog-sa/stardog --namespace dev-sd --values values.yaml

These commands do the following:

Execute the installation

You can the execute the installation with the following command:

helm install dev-sd stardog-sa/stardog --namespace stardog-ns --values values.yaml

This command installs the stardog chart from the stardog-sa repo into the stardog-ns namespace of our Kubernetes cluster, with configurations specified according to our values.yaml file. This gives us our new deployment, dev-sd.

Verify the installation

To see all pods running in our stardog-ns namespace, run the following command:

kubectl -n stardog-ns get pod

What’s Next?

If you want to deploy Stardog Launchpad with Kubernetes, see Launchpad with Kubernetes. For more information on managing your cluster, see High Availability Cluster.