Genel

Kubernetes Velero Backup & Restore

Velero arkasında minio kullanır. Minio’yu docker üzerinde çalıştıralım.

docker pull minio/minio
docker run –name minio -p 9000:9000 -p 9001:9001 -v data:/data minio/minio server –console-address :9001 /data

default username: minioadmin
default password: minioadmin

VELERO CLI KURULUMU

wget https://github.com/heptio/velero/releases/download/v1.8.1/velero-v1.8.1-linux-amd64.tar.gz
tar zxf velero-v1.0.0-linux-amd64.tar.gz
sudo mv velero-v1.0.0-linux-amd64/velero /usr/local/bin/
rm -rf velero*

MINIO CREDENTIALS

cat <> minio.credentials
[default]
aws_access_key_id=miniadmin
aws_secret_access_key=minioadmin
EOF

KUBERNETESE VELERO DEPLOY ETME — CLUSTER İLE KONUŞMASINI SAĞLAR

velero install \
–provider aws \
–bucket kubernetes-backup \
–secret-file ./minio.credentials \
–backup-location-config region=minio,s3ForcePathStyle=true,s3Url=http://192.168.1.22:9000 \
–snapshot-location-config region=minio \
–use-volume-snapshots=true \
–plugins velero/velero-plugin-for-aws:v1.4.0

Backup Alma İşlemi

velero backup create nginx –include-namespaces nginx –snapshot-volumes –wait
velero restore create nginx-restore –from-backup nginx