Getting Started Tutorial
This tutorial provides a quick introduction to K8up, how it works and how to use it.
Overview
-
Install K8up
-
Install services (for local development)
-
Configure a PVC (for local development)
-
Configure credentials
-
Create backups
-
Restore backups
-
Local development
Local Development
This section provides information about the minimum requirements for testing K8up on Minikube.
Before starting please make sure Minikube is installed and started, and that helm
is installed and properly initialized in your Minikube.
Install K8up
See Install K8up.
Install MinIO
MinIO is a distributed object storage service for high performance, high scale data infrastructures. It’s a drop in replacement for AWS S3 in your own environment. We’re going to install it to simulate a remote S3 bucket where our backups are going to be stored:
kubectl create -f https://github.com/minio/minio/blob/master/docs/orchestration/kubernetes/minio-standalone-pvc.yaml?raw=true
kubectl create -f https://github.com/minio/minio/blob/master/docs/orchestration/kubernetes/minio-standalone-deployment.yaml?raw=true
kubectl create -f https://github.com/minio/minio/blob/master/docs/orchestration/kubernetes/minio-standalone-service.yaml?raw=true
bash
After a few minutes you should be able to see your MinIO installation on the browser using minikube service minio-service
. The default Minio installation uses the access key minio
and secret key minio123
.
Create a PersistentVolumeClaim Resource
This will be the resource backed up by K8up:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: apvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
yaml
Save the YAML above in a file named pvc.yml
and use the kubectl apply -f pvc.yml
command to deploy this configuration to your cluster.
Create Backup Credentials
Create the secret credentials for the backup repository:
apiVersion: v1
kind: Secret
metadata:
name: backup-credentials
namespace: default
type: Opaque
stringData:
username: minio
password: minio123
---
apiVersion: v1
kind: Secret
metadata:
name: backup-repo
namespace: default
type: Opaque
stringData:
password: p@ssw0rd
yaml
Save the YAML above in a file named secrets.yml
and use the kubectl apply -f secrets.yml
command to deploy this configuration to your cluster.
The default MinIO installation uses the access key minio
and secret key minio123
. They’re in plain text inside the backup-credentials
Secret definition and will be encoded as Base64 when the Secret is created on your cluster.
Please store the password of the backup-repo Secret somewhere safe. This is the encryption password for Restic. Without it you will lose access to the backup permanently.
|
What’s Next?
For advanced configuration of the operator please see Advanced Config Reference.