Installation

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

Prerequisites

  • A PostgreSQL instance protected with TLS (can be self-signed, KubeArchive does not verify it)

  • 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 a database user kubearchive.

  2. With a DB admin account, apply the schema provided in the kubearchive.sql file within the KubeArchive release:

    wget https://github.com/kubearchive/kubearchive/releases/download/v0.11.0/kubearchive.sql
    psql -h database.example.com \
    -U admin \
    -f kubearchive.sql

More information about the schema and its customization in the Database Integration section.

Configure Knative Eventing

KubeArchive uses a broker to avoid missing Kubernetes resource updates. By default, it is an MTChannelBasedBroker, but the broker type can be changed if desired.

Knative Eventing strongly recommends using one of the other broker types in production environments.

Install and Configure KubeArchive

  1. Apply the release YAML to install KubeArchive:

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

    kubectl patch secret -n kubearchive kubearchive-database-credentials \
    --patch='{"stringData": {
    "DATABASE_URL": "database.example.com", (1)
    "DATABASE_PASSWORD": "password" (2)
    }}'
    1 The database URL
    2 The database password

    More info about this Secret in the Database Integration section.

  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.