Velero plugin
    • PDF

    Velero plugin

    • PDF

    Article Summary

    Available in VPC

    You can use Velero plugin if a Kubernetes cluster needs to be backed up. Kubernetes objects can be compressed and backed up to object storage through Velero, and the cluster's PersistentVolume snapshots can be created to restore the cluster objects and PersistentVolume to their previous states. Please take note of the following before use.

    • This guide is created based on Ubuntu 20.04 OS and Velero v1.10.3.
    • Object storage and bucket provided by NAVER Cloud Platform are required. For more information on the service, see Object storage overview.
    • To activate the outbound Internet traffic before using Velero, you must create NAT Gateway.
    • AccessKey and SecretKey information of NAVER Cloud Platform account in use is required.

    Install Velero

    To install Velero plugin, proceed with the following steps in order.

    1. Install Velero client
    2. Register secret
    3. Install Velero server
    4. Configure snapshot

    1. Install Velero client

    1. Download the client in the version you want to install from the Velero GitHub storage.

    2. Run the command shown below to go to the /tmp folder.

      $ cd /tmp
      
    3. Run the command shown below to download the release tarball.

      $ wget https://github.com/vmware-tanzu/velero/releases/download/[version]/[release matched to OS and Architecture]
      
      ex) wget https://github.com/vmware-tanzu/velero/releases/download/v1.10.3/velero-v1.10.3-linux-amd64.tar.gz
      
    4. Run the tar command shown below to decompress the downloaded file.

      $ tar -xvzf velero-v1.10.3-linux-amd64.tar.gz
      
      • You can check if it is downloaded properly by using Velero binary of velero-v1.10.3-linux-amd64 in the /tmp path.
    5. Run the command shown below to move the downloaded file to the /usr/local/bin path.

      $ sudo mv velero-v1.10.3-linux-amd64/velero /usr/local/bin/velero  
      

    2. Register secret

    Run the following command to enter the following value.

    • aws_access_key_id: AccessKey
    • aws_secret_access_key: SecretKey
    • region: Region where the cluster belongs to (KR, SGN, and JPN)
    • server_api_uri: Server(VPC) API URI
    $ vi cloud-credential
    
    [default]
    aws_access_key_id=<ACCESS_KEY_ID>
    aws_secret_access_key=<SECRET_ACCESS_KEY>
    region=<REGION>
    server_api_uri=https://ncloud.apigw.ntruss.com/vserver/v2
    

    3. Install Velero server

    Run the command shown below to install Velero server. In --bucket velero-backup, change the content of velero-backup to the name of the Bucket of the Object Storage within NAVER Cloud Platform.

    • IMAGE_REGISTRY:
      • KR: nks.kr.private-ncr.ntruss.com/
      • SGN: nks.sg.private-ncr.ntruss.com/
      • JPN: nks.jpn.private-ncr.naverncp.com/
    • S3_URL:
      • KR: https://kr.object.private.ncloudstorage.com
      • SGN: https://sg.object.private.ncloudstorage.com
      • JPN: https://jp.object.private.ncpstorage.com
    velero install \
      --kubeconfig $KUBE_CONFIG \
      --provider velero.io/aws \
      --bucket velero-backup \
      --plugins velero/velero-plugin-for-aws:v1.6.2,<IMAGE_REGISTRY>/velero-plugin-for-ncloud:v0.0.8 \
      --backup-location-config region=kr,s3ForcePathStyle="true",s3Url=<S3_URL> \
      --use-volume-snapshots=false \
      --secret-file=./cloud-credential
    

    You can run the following command to check after the installation is completed.

    $ kubectl --kubeconfig $KUBE_CONFIG get deployment/velero --namespace velero
    

    4. Configure snapshot

    In order to create a snapshot of the cluster block storage, run the command shown below to designate the plugin provided by NAVER Cloud Platform as the default snapshot provider.

    $ velero --kubeconfig $KUBE_CONFIG snapshot-location create default --provider ncloud/volume-snapshotter-plugin
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.