Velero
Back up and restore Kubernetes namespaces to XNS storage with Velero and its AWS plugin.
Overview
Velero is the open-source backup and restore tool for Kubernetes. It saves cluster resources (deployments, services, config maps, secrets and the rest) as backup files in an object storage bucket, and restores them into the same or another cluster. With XNS, that bucket lives on your Relayer, through Velero’s AWS plugin and a backup storage location that points at the Relayer.
Tested with Velero 1.18.4 and velero-plugin-for-aws 1.14.4 on 2026-10-18 against Relayer build 59a37e64.
The run used a single-node Kubernetes 1.37 cluster. It backed up a namespace holding a deployment, a service, a config map and a secret, deleted the namespace, restored it, and compared the config map, the secret and the content the pods served by SHA-256: all identical. It ran once over HTTP on port 9000 and once over HTTPS on port 9443 with a trusted certificate. velero backup delete then removed every backup object from the bucket.
Connect to XNS
Every S3 tool connects to your Relayer with the same settings. Enter them exactly as shown; the notes below the table cover the two that most tools get wrong by default.
| Setting | Value |
|---|---|
| Endpoint (HTTP) | http://<relayer-host>:9000, where <relayer-host> is the address of the machine running your Relayer. Always available. |
| Endpoint (HTTPS) | https://<relayer-host>:9443, available only after a certificate is installed on the Relayer. Port 9000 never serves HTTPS. |
| Region | us-east-1 |
| Addressing | Path-style. In tools that ask, turn on force path style or path-style access, and turn off virtual-hosted style. |
| Signature | Signature Version 4 (V4). Version 2 is refused. |
| Access key and secret key | For a tool, create a scoped key: IAM → Create IAM User in the Relayer UI. The secret is shown once, so copy it then. The install’s root pair is on Configure → Credentials; keep it for administration. |
| Bucket | Create it first: Files → Create Bucket in the Relayer UI, or let the tool create it. Names are 3-63 characters of lowercase letters, digits, hyphens and periods. |
HTTPS and certificates. The Relayer UI offers two certificates for port 9443: Let’s Encrypt, which needs a domain managed in Cloudflare and a Cloudflare API token, or self-signed. Most tools refuse a self-signed certificate unless certificate verification is turned off in the tool. On a private network, plain HTTP on port 9000 avoids the question.
Path-style. A tool left on virtual-hosted style (often labeled Amazon S3 or AWS) sends the bucket name in the hostname, and the Relayer cannot find the bucket. Choose the tool’s S3 compatible or generic S3 option and set path-style.
Not supported: server-side encryption with customer-provided keys (SSE-C) or KMS keys (SSE-KMS), bucket website hosting and bucket replication. Server-side encryption with AES256 is accepted. See Encryption at the Gateway, Identity and Access and Configure.
Prerequisites
- A Kubernetes cluster and
kubectlaccess to it. - The Velero CLI 1.18 or later, from the Velero releases page.
- A bucket and a scoped key on your Relayer (see the table above).
- Network access from the cluster’s pods to
<relayer-host>on port 9000 or 9443. If<relayer-host>is a name, it must resolve inside the cluster.
Step 1: Write the credentials file
Velero reads the key from a file in the AWS credentials format. Keep it off shared machines and delete it once Velero is installed.
[default]
aws_access_key_id=<access key>
aws_secret_access_key=<secret key>Step 2: Install Velero with the AWS plugin
These are the options from the tested run. s3ForcePathStyle and s3Url are what point the AWS plugin at the Relayer instead of Amazon.
velero install \
--provider aws \
--plugins velero/velero-plugin-for-aws:v1.14.4 \
--bucket <bucket> \
--prefix <cluster-name> \
--secret-file ./credentials-velero \
--use-volume-snapshots=false \
--backup-location-config region=us-east-1,s3ForcePathStyle="true",s3Url=http://<relayer-host>:9000| Option | Value |
|---|---|
--bucket | The bucket you created on the Relayer |
--prefix | Optional folder inside the bucket, so several clusters can share it |
region | us-east-1 |
s3ForcePathStyle | "true", quoted. Without it the plugin uses virtual-hosted style and the Relayer cannot find the bucket. |
s3Url | http://<relayer-host>:9000, or https://<relayer-host>:9443 once a certificate is installed |
--use-volume-snapshots=false | Volume snapshots go to the cluster’s own snapshot provider, not to XNS |
Step 3: Check the backup location
velero backup-location getThe default location shows Available once Velero has listed the bucket. Right after installation it can show unavailable for a few seconds until the first check runs.
Step 4: Back up and restore
velero backup create <backup-name> --include-namespaces <namespace> --wait
velero backup describe <backup-name>
velero restore create --from-backup <backup-name> --wait
velero restore describe <restore-name>To schedule backups, use velero schedule create <name> --schedule "0 2 * * *" --include-namespaces <namespace>. To remove a backup and its objects in the bucket, use velero backup delete <backup-name>.
Use HTTPS or a second location
For HTTPS, set s3Url=https://<relayer-host>:9443. The tested run used a trusted certificate. Another location can be added to an installed Velero and chosen per backup:
velero backup-location create xns-https \
--provider aws \
--bucket <bucket> \
--prefix <cluster-name> \
--config region=us-east-1,s3ForcePathStyle="true",s3Url=https://<relayer-host>:9443
velero backup create <backup-name> --include-namespaces <namespace> --storage-location xns-https --waitKnown limits
- Resources only were tested. The tested namespace had no persistent volumes. Velero’s file-system backup of volume data (the node agent) writes to the same bucket but was not tested with XNS, and CSI or cloud volume snapshots never go to XNS.
- The Velero pod must reach the Relayer by the name in
s3Url. If cluster DNS cannot resolve<relayer-host>, the location stays unavailable. Use an address the cluster resolves, or add ahostAliasesentry to the Velero deployment. - A self-signed certificate on port 9443 was not tested. Velero’s
--cacertoption passes a CA certificate to the plugin; plain HTTP on port 9000 avoids the question on a private network. - Checksums: the plugin’s default CRC32 upload checksum worked over both HTTP and HTTPS, so no
checksumAlgorithmsetting was needed. - The bucket stays after you uninstall Velero. A scoped key can empty a bucket but not delete it.
- Object Lock (immutable backups) is supported by the Relayer but was not tested with Velero.
- Not supported by the Relayer: SSE-C and SSE-KMS server-side encryption, so leave the plugin’s
kmsKeyIdandcustomerKeyEncryptionFileoptions unset.serverSideEncryption=AES256is accepted. Bucket replication is not supported.
