Kubernetes Cluster

Kubernetes Cluster resources represent the manifests of a Kubernetes cluster, either the whole cluster or a single namespace. The Kubernetes integration backs them up and restores them through the k8s protocol.

These resources hold the configuration of the cluster only. The contents of persistent volumes and virtual machine disks are not part of their backups, and are backed up through Kubernetes PVC and Kubernetes VM resources.

A backup reads the manifests of the resources in the namespace, or in every namespace for the cluster resource, along with their status, and stores them in the Kloset store. Browsing a restore point shows the state of deployments, nodes and other resources at the time of the backup. A restore applies the manifests to the cluster again.

The kubeconfig used by the app must grant the permissions required by the operation. Source apps use the manifest backup role and destination apps use the manifest restore role.

Inventory Management

Managed inventories discover the cluster resource and one resource per namespace once the Kubernetes inventory is connected to a cluster. The cluster resource is listed when the inventory discovers every namespace.

Backup flow

flowchart TD
  subgraph K8s["Kubernetes Cluster"]
    API["API Server"]
  end

  subgraph Plakar["Plakar Control Plane"]
    Source["Kubernetes Cluster
Source app"] Backup["Backup process
Encrypt & deduplicate"] end Store["Kloset Store"] Source -->|"reads manifests"| API Source --> Backup Backup --> Store

Restore flow

flowchart TD
  Store["Kloset Store"]

  subgraph Plakar["Plakar Control Plane"]
    Destination["Kubernetes Cluster
Destination app"] Restore["Restore process"] end subgraph K8s["Kubernetes Cluster"] API["API Server"] end Store --> Restore Destination --> Restore Restore -->|"applies manifests"| API

Shared Configuration

The following setting is available when configuring both source and destination apps.

  • Kubeconfig: Paste the contents of a kubeconfig. Leave it empty when Plakar Control Plane runs inside the cluster to use the in-cluster configuration. The kubeconfig can also be loaded from a secret provider.

Source Configuration

The following setting is only available when configuring source apps.

  • Labels: Optional. A label selector restricting the resources backed up, for example app=nginx.

Destination Configuration

The following setting is only available when configuring destination apps.

  • Ignore Resources: Optional. A semicolon-separated list of group/Kind to leave out of the restore, for example apps/Deployment;cert-manager.io/Certificate;/ConfigMap. Leave the group empty for the core group. Kinds are case-sensitive.