If you need a backup of your NHN Kubernetes Service (NKS) cluster, you can use the Velero plugin to back it up to Object Storage. This document describes how to back up and restore a cluster using Object Storage and Velero.
For more information on Velero, refer to Velero Docs.
To use the Object Storage API, you must check the tenant ID and API endpoint, and set the API password and create Temporary URL key.
You can check the tenant ID and API endpoint by clicking the Set API Endpoint button on the Object Storage service page.
| Item | API Endpoint | Usage |
|---|---|---|
| Identity | https://api-identity-infrastructure.nhncloudservice.com/v2.0 | Issue an authentication token |
| Tenant ID | 32 character string consisting of numbers and alphabets | Issue an authentication token |
You can set the API password by clicking the Set API Endpoint button on the Object Storage service page.
For more information about the Object Storage API, see the Object Storage API Guide.
To use the velero log command in the Velero client, you must create a Temporary URL Key in Object Storage.
| Name | Type | Format | Required | Description |
|---|---|---|---|---|
| X-Auth-Token | Header | String | O | Token ID |
| X-Account-Meta-Temp-Url-Key | Header | String | O | Key information used in Temporary |
$ curl -X POST {Object Store} -H "X-Auth-Token: {tokenId}" -H "X-Account-Meta-Temp-Url-Key: {key}"
The Velero client is a program where you can enter the cluster's backup and restore commands. You can download the Velero client from the Velero Github repository and use it for cluster backup and restoration. Before running the downloaded Velero client command, you must download the kubeconfig file of the backup and restore clusters from the web console, and set the KUBECONFIG environment variable to specify the target clusters for backup and restoration exactly. For more information on kubeconfig settings, see Installing kubectl.
$ wget https://github.com/vmware-tanzu/velero/releases/download/v1.17.0/velero-v1.17.0-linux-amd64.tar.gz
$ tar xzf velero-v1.17.0-linux-amd64.tar.gz
Move the file to the path specified in the environment variable so that you can run the Velero client from any path, or add the path where Velero is located to the environment variable.
$ sudo mv velero-v1.17.0-linux-amd64/velero /usr/local/bin
$ export PATH=$PATH:$(pwd)
Install the Velero server using Helm.
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
The downloaded file does not have execute permission by default. Add an execute permission.
$ chmod 700 get_helm.sh
$ ./get_helm.sh
To install the Velero server, you need to add the Helm repository.
$ helm repo add vmware-tanzu https://vmware-tanzu.github.io/helm-charts
The Velero server must be installed on a backup cluster and a restore cluster respectively. We recommend that you install using the same helm command on both clusters to use the same Object Storage.
$ helm install velero vmware-tanzu/velero \
--namespace velero \
--create-namespace \
--version 11.0.0 \
--set initContainers[0].name=velero-plugin-for-openstack \
--set initContainers[0].image=lirt/velero-plugin-for-openstack:v0.6.1 \
--set initContainers[0].volumeMounts[0].name=plugins \
--set initContainers[0].volumeMounts[0].mountPath=/target \
--set configuration.defaultVolumesToRestic=true \
--set configuration.defaultResticPruneFrequency=1m \
--set configuration.backupStorageLocation[0].name=default \
--set configuration.backupStorageLocation[0].provider=community.openstack.org/openstack \
--set-string configuration.backupStorageLocation[0].bucket={Container} \
--set-string configuration.backupStorageLocation[0].config.region={Region} \
--set-string configuration.backupStorageLocation[0].config.resticRepoPrefix="swift:{Container}:/restic" \
--set configuration.volumeSnapshotLocation[0].name=default \
--set configuration.volumeSnapshotLocation[0].provider=community.openstack.org/openstack-cinder \
--set configuration.volumeSnapshotLocation[0].config.region={Region} \
--set configuration.extraEnvVars[0].name=OS_AUTH_URL \
--set-string configuration.extraEnvVars[0].value="{Identity}" \
--set configuration.extraEnvVars[1].name=OS_TENANT_ID \
--set-string configuration.extraEnvVars[1].value="{Tenant ID}" \
--set configuration.extraEnvVars[2].name=OS_USERNAME \
--set-string configuration.extraEnvVars[2].value="{NHN Cloud ID}" \
--set configuration.extraEnvVars[3].name=OS_PASSWORD \
--set-string configuration.extraEnvVars[3].value="{API password}" \
--set configuration.extraEnvVars[4].name=OS_REGION_NAME \
--set-string configuration.extraEnvVars[4].value="{Region}" \
--set configuration.extraEnvVars[5].name=OS_DOMAIN_ID \
--set-string configuration.extraEnvVars[5].value="default"
| Item | Description |
|---|---|
| Container | Name of the container used in Object Storage |
| Region | Korea (Pangyo) Region: KR1Korea (Pyeongchon) Region: KR2Korea (Gwangju) Region: KR3 |
| Identity service | Identity service in API Endpoint settings |
| Tenant ID | Tenant ID in API Endpoint Settings |
| NHN Cloud ID | NHN Cloud ID |
| API password | API password entered in API Endpoint settings |
You can uninstall the Velero server with the velero uninstall command.
You can configure a cluster backup with the velero backup create command.
$ export KUBECONFIG={kubeconfig file of the backup cluster}
$ velero backup create {name} --exclude-namespaces kube-system,velero
[Caution] You must exclude the namespaces that do not require backup such as
kube-systemandvelero. If such namespaces are included in a backup, a problem might occur while performing restoration.
You can check the cluster backup status with the velero backup get command.
$ velero backup get
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
my-backup Completed 0 0 2025-10-13 11:01:53 +0900 KST 29d default <none>
You can configure a cluster backup/restoration with the velero restore create command.
$ export KUBECONFIG={kubeconfig file of the restore cluster}
$ velero restore create --from-backup {name}
[Caution] Since StorageClass resources are not backed up and restored, you must create a storage class with the same name as the one existing in the
backup clusterin therestore clusterbefore restoration.[Caution] If the versions of the
backup clusterand therestore clusterare different, problems may occur during restoration.
$ velero backup create my-backup --exclude-namespaces kube-system,velero
$ velero backup get
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
my-backup Completed 0 0 2025-10-13 11:01:53 +0900 KST 29d default <none>
$ velero restore create --from-backup my-backup
$ kubectl get pod --all-namespaces
You can configure periodic backups with the velero schedule create command. See schedule-a-backup for details.
$ velero schedule create my-schedule --schedule="*/10 * * * *" --exclude-namespaces kube-system,velero
$ velero backup get
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
my-schedule-20251013055022 Completed 0 0 2025-10-13 14:50:22 +0900 KST 29d default <none>
my-schedule-20251013054022 Completed 0 0 2025-10-13 14:40:22 +0900 KST 29d default <none>
Periodic backups can be cleared with the velero schedule delete command.
$ velero schedule get
NAME STATUS CREATED SCHEDULE BACKUP TTL LAST BACKUP SELECTOR PAUSED
my-schedule Enabled 2025-10-13 14:38:11 +0900 KST */10 * * * * 0s 18s ago <none> false
$ velero schedule delete my-schedule
Are you sure you want to continue (Y/N)? y
Schedule deleted: my-schedule