Installation

This document explains how to install and configure KubeArchive in your Kubernetes cluster.

Prerequisites

  • A PostgreSQL instance

  • CertManager is installed on the Kubernetes cluster (+v1.9.1)

  • Knative Eventing is installed on the Kubernetes cluster (+v1.15.0)

Prepare the Database

  1. Create ada user and a password for KubeArchive to use.

  2. Create a database for KubeArchive, with admin permissions granted to the user you just created.

  3. As the user, execute the kubearchive.sql we provide for initializing the database, located at:

    wget https://github.com/kubearchive/kubearchive/releases/latest/download/kubearchive.sql
    psql -h database.example.com -U username ... -f kubearchive.sql

    This file creates a PostgreSQL schema, a table for KubeArchive and other stuff KubeArchive requires.

Install and Configure KubeArchive

  1. Apply the release YAML to install KubeArchive:

    kubectl apply -n kubearchive -f https://github.com/kubearchive/kubearchive/releases/latest/download/kubearchive.yaml
  2. Provide the credentials for the database in the kubearchive-database-credentials secret:

    cat <<EOF > /tmp/patch.yaml
    stringData:
      DATABASE_KIND: postgresql
      DATABASE_PORT: <postgresql-port>
      DATABASE_URL: <postgresql-url>
      DATABASE_USER: <kubearchive-username>
      DATABASE_DB: <kubearchive-database>
      DATABASE_PASSWORD: <kubearchive-password>
    EOF
    kubectl patch -n kubearchive secret kubearchive-database-credentials --patch-file /tmp/patch.yaml
  3. Restart the kubearchive-api-server and kubearchive-sink Deployments to update the database credentials secret:

    kubectl rollout -n kubearchive restart deployment kubearchive-sink kubearchive-api-server

Next steps

Continue with Accessing KubeArchive to learn how to access archived resources.