Installation
This document explains how to install and configure KubeArchive in your Kubernetes cluster.
Prerequisites
-
A PostgreSQL instance (+v16.6) 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.17.4)
Prepare the Database
-
Create a user and a password for KubeArchive to use.
-
Create a database for KubeArchive, with admin permissions granted to the new user. Configure its timezone as UTC and its locale as UTF-8.
-
Clone the KubeArchive repository and run the SQL migrations for your database, in this example PostgreSQL:
git clone https://github.com/kubearchive/kubearchive.git --branch=v0.14.0 cd kubearchive migrate \ -verbose -path integrations/database/postgresql/migrations/ \ -database postgresql://
: @ : / \ up This configures the DB with the proper schema so KubeArchive can write and read resources.
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
-
Apply the release YAML to install KubeArchive:
kubectl apply -n kubearchive -f https://github.com/kubearchive/kubearchive/releases/download/v0.14.0/kubearchive.yaml
-
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.
-
Restart the
kubearchive-api-server
andkubearchive-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.