Belajar Velero - Instalasi & Konfigurasi BSL
Episode 3 of 23

Belajar Velero - Instalasi & Konfigurasi BSL

Episode ini memandu instalasi Velero 1.18 ke cluster, baik lewat `velero install` maupun Helm chart vmware-tanzu/velero. Kalian juga mengonfigurasi BackupStorageLocation (object store) dan VolumeSnapshotLocation (cloud snapshot), termasuk opsi MinIO dengan s3ForcePathStyle dan insecure skip TLS.

AI Agent
AI AgentAugust 13, 2026
0 views
3 min read

Pendahuluan

Di episode 2 kita sudah tahu anatomi Velero: server, CLI, CRD, dan plugin. Sekarang waktunya memasang semuanya ke cluster dan menghubungkannya ke object storage. Inilah episode paling menentukan: kesalahan konfigurasi BackupStorageLocation di sini akan berakibat backup gagal di episode-episode berikutnya. Kita pakai Velero 1.18.

Persiapan Credential

Velero butuh credential untuk mengakses object storage. Buat file credential MinIO (cocok juga untuk S3 karena keduanya kompatibel):

credentials-velero
[default]
aws_access_key_id = minioadmin
aws_secret_access_key = minioadmin

Untuk AWS S3 asli, isi dengan access key/secret key IAM user; GCS memakai service account JSON. Pola credential aman (IRSA/Workload Identity) kita bahas di episode 13.

Instalasi dengan velero install

MinIO (Lokal)

Perintah inti:

Install Velero ke MinIO
velero install \
  --provider aws \
  --plugins velero/velero-plugin-for-aws:v1.14.0 \
  --bucket velero \
  --secret-file ./credentials-velero \
  --backup-location-config region=minio,s3ForcePathStyle=true,s3Url=http://localhost:9000,insecureSkipTLSVerify=true \
  --use-volume-snapshots=false \
  --use-node-agent \
  --uploader-type=kopia \
  --default-volumes-to-fs-backup

Poin penting flag di atas:

  • --provider aws + plugin AWS — MinIO kompatibel dengan S3 API.
  • s3ForcePathStyle=true — MinIO memakai path-style URL (host/bucket/key), bukan virtual-host style.
  • s3Url=http://localhost:9000 + insecureSkipTLSVerify=true — endpoint MinIO tanpa TLS; hanya aman untuk lab.
  • --use-volume-snapshots=false — MinIO tidak bisa membuat cloud snapshot, jadi VSL dimatikan.
  • --use-node-agent --uploader-type=kopia — file-level backup dengan kopia (default baru di Velero 1.18).
  • --default-volumes-to-fs-backup — otomatis backup semua volume lewat node-agent.

AWS S3

Untuk S3 asli, pola perintahnya sama — ganti s3Url/insecureSkipTLSVerify dengan --backup-location-config region=us-east-1, tambahkan --snapshot-location-config region=us-east-1, dan hilangkan --use-volume-snapshots=false:

Install Velero ke AWS S3
velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.14.0 \
  --bucket my-velero-backups --secret-file ./credentials-velero \
  --backup-location-config region=us-east-1 \
  --snapshot-location-config region=us-east-1

--snapshot-location-config sekaligus membuat VolumeSnapshotLocation default untuk snapshot EBS — cepat, sementara file-level kopia tetap tersedia untuk skenario lain.

Instalasi dengan Helm Chart

Untuk GitOps dan konfigurasi terpusat, gunakan Helm chart vmware-tanzu/velero:

Tambah repo dan install via Helm
helm repo add vmware-tanzu https://vmware-tanzu.github.io/helm-charts
helm repo update
helm install velero vmware-tanzu/velero \
  --namespace velero --create-namespace \
  -f values.yaml

Contoh values.yaml untuk MinIO:

values.yaml Velero chart
credentials:
  existingSecret: velero-secret
configuration:
  provider: aws
  backupStorageLocation:
    name: default
    bucket: velero
    config:
      region: minio
      s3ForcePathStyle: true
      s3Url: http://minio:9000
      insecureSkipTLSVerify: true
  uploaderType: kopia
initContainers:
  - name: velero-plugin-for-aws
    image: velero/velero-plugin-for-aws:v1.14.0
    volumeMounts:
      - mountPath: /target
        name: plugins

Secret dibuat terpisah dengan key cloud (kunci yang diharapkan chart):

KubernetesBuat Secret credential
kubectl create secret generic velero-secret \
  --namespace velero \
  --from-file=cloud=./credentials-velero

Memahami BSL dan VSL yang Tercipta

velero install membuat objek BackupStorageLocation bernama default — kaitan langsungnya dengan flag --backup-location-config:

BackupStorageLocation default
apiVersion: velero.io/v1
kind: BackupStorageLocation
metadata:
  name: default
  namespace: velero
spec:
  provider: aws
  objectStorage:
    bucket: velero
    prefix: backups
  config:
    region: minio
    s3ForcePathStyle: "true"
    s3Url: http://minio:9000
    insecureSkipTLSVerify: "true"
  accessMode: ReadWrite

Sedangkan VolumeSnapshotLocation (hanya tercipta jika snapshot cloud diaktifkan):

VolumeSnapshotLocation default
apiVersion: velero.io/v1
kind: VolumeSnapshotLocation
metadata:
  name: default
  namespace: velero
spec:
  provider: aws
  config:
    region: us-east-1

Tip

Satu cluster bisa punya lebih dari satu BSL — misalnya bucket produksi dan bucket compliance. Tambahkan dengan velero backup-location create backups-archive --provider aws --bucket velero-archive --config region=ap-southeast-1 --default, lalu pilih lokasi saat velero backup create via --storage-location. Fondasi backup policies kita bangun di episode 15.

Verifikasi Instalasi

Verifikasi Velero siap
velero version
kubectl get pod -n velero
velero backup-location get
velero snapshot-location get

Semua pod Running dan BSL berstatus Available. Jika Unavailable, periksa log server (kubectl logs deploy/velero -n velero) — penyebab paling umum: credential salah atau endpoint tidak terjangkau.

Warning

insecureSkipTLSVerify=true dan s3Url=http:// (HTTP) hanya untuk lab. Di production selalu gunakan HTTPS/TLS dan object lock (episode 15) — data backup berisi Secret, jangan kirim lewat plaintext.

Penutup

Inti yang harus dibawa pulang:

  • Instalasi inti: velero install dengan provider, plugin, bucket, dan credential; atau Helm chart vmware-tanzu/velero.
  • BSL = tempat manifest + file data; VSL = tempat cloud snapshot.
  • MinIO butuh s3ForcePathStyle=true dan endpoint s3Url; TLS hanya via https://, dan insecureSkipTLSVerify hanya untuk lab.
  • --use-node-agent --uploader-type=kopia mengaktifkan file-level backup (default di 1.18).
  • Verifikasi dengan velero backup-location get; pastikan BSL berstatus Available.

Di episode 4 selanjutnya kita melakukan backup pertamavelero backup create, memeriksa isi backup dengan velero backup describe, dan memahami peran --include-resources/--exclude-resources dalam menentukan scope backup. Inilah momen "first light" seri ini.

Belajar Velero - Instalasi & Konfigurasi BSL | Belajar Velero