Getting Started with Trilio on Google Kubernetes Engine (GKE)
Learn how to install, license and test Trilio for Kubernetes (T4K) in the Google Cloud (GKE) environment.
Last updated
Learn how to install, license and test Trilio for Kubernetes (T4K) in the Google Cloud (GKE) environment.
Last updated
Trilio for Kubernetes is a cloud-native backup and restore application. Being a cloud-native application for Kubernetes, all operations are managed with CRDs (Customer Resource Definitions).
Trilio utilizes Control Plane and Data Plane controllers to carry out the backup and restore operations defined by the associated CRDs. When a CRD is created or modified the controller reconciles the definitions to the cluster.
Trilio gives you the power and flexibility to backup your entire cluster or select a specific namespace(s), label, Helm chart, or Operator as the scope for your backup operations.
In this tutorial, we'll show you how to install and test operation of Trilio for Kubernetes on your GKE deployment.
Trilio for Kubernetes requires a compatible Container Storage Interface (CSI) driver that provides the Snapshot feature.
Trilio for Kubernetes requires the following Custom Resource Definitions (CRD) to be installed on your cluster:VolumeSnapshot
, VolumeSnapshotContent
, and VolumeSnapshotClass.
For non-air-gapped environments, the following URLs must be accessed from your Kubernetes cluster.
Access to the S3 endpoint if the backup target happens to be S3
Access to application artifacts registry for image backup/restore
If the Kubernetes cluster's control plane and worker nodes are separated by a firewall, then the firewall must allow traffic on the following port(s)
9443
Trilio provides a preflight check tool that allows customers to validate their environment for Trilio installation.
The tool generates a report detailing all the requirements and whether they are met or not.
If you encounter any failures, please send the Preflight Check output to your Trilio Professional Services and Solutions Architect so we may assist you in satisfying any missing requirements before proceeding with the installation.
The T4K user interface facilitates authentication through kubeconfig files, which house elements such as tokens, certificates, and auth-provider information. However, in some Kubernetes cluster distributions, the kubeconfig might include cloud-specific exec actions or auth-provider configurations to retrieve the authentication token via the credentials file. By default, this is not supported.
When using kubeconfig on the local system, any cloud-specific action or config in the user section of the kubeconfig will seek the credentials file in a specific location. This allows the kubectl/client-go library to generate an authentication token for use in authentication. However, when the T4K Backend is deployed in the Cluster Pod, the credentials file necessary for token generation is not accessible within the Pod.
To rectify this, T4K features cloud distribution-specific support to manage and generate tokens from these credential files.
In a GKE cluster, a local binary known as gcloud is used pull the credentials from a sqlite credentials file named credentials.db.
This file is located under the path $HOME/.config/gcloud and is used to generate an authentication token.
All required parameters for generating this token are present within the same credentials.db file. When a user attempts to log into the T4K user interface deployed in the GKE cluster, they are expected to supply the credentials.db file from the location $HOME/.config/gcloud for successful authentication.
To generate and apply the Trilio license, perform the following steps:
2. Apply the license file to a Trilio instance using the command line or UI:
Execute the following command:
2. If the previous step is successful, check that the output generated is similar to the following:
A license upgrade is required when moving from one license type to another.
Trilio maintains only one instance of a license for every installation of Trilio for Kubernetes.
To upgrade a license, run kubectl apply -f <licensefile> -n <install-namespace>
against a new license file to activate it. The previous license will be replaced automatically.
Create a storage bucket from the Google cloud console.
Name the storage bucket and choose a region.
Select the preferred access control setting.
Select the desired protection setting
Create or select access credentials with required permissions
To add a GCP storage bucket as a backup target within T4K, specific bucket permissions are required.
Create a custom role with the following required permissions
The Target CR (Customer Resource) is defined from the Trilio Management Console or from your own self-prepared YAML.
The Target object references the NFS or S3 backup storage share you provide as a target for your backups. Trilio will create a validation pod in the namespace where Trilio is installed and attempt to validate the NFS or S3 settings you have defined in the Target CR.
Trilio makes it easy to automatically create your backup Target CRD from the Management Console.
Select Other from the Dropdown
Provide all required details
Configured Bucket Name
Provide Service User Access key and Secret key from GCP Cloud Storage / Settings / Interoperability / Access
Finally, select a name for this Target. Additional Backup Targets can be created with the same details, however the name must be unique.
Confirm that Target Status is Available, indicating that the Backup Target has been created successfully.
Take control of Trilio and define your own self-prepared YAML and apply it to the cluster using the kubectl tool.
The Backup Plan CR is defined from the Trilio Management Console or from your own self-prepared YAML.
The Backup Plan CR must reference the following:
Your Application Data (label/helm/operator)
Backup Target CR
Scheduling Policy CR
Retention Policy CR
A Target CR is defined from the Trilio Management Console or from your own self-prepared YAML. Trilio will test the backup target to ensure it is reachable and writable. Look at Trilio validation pod logs to troubleshoot any backup target creation issues.
Retention and Schedule Policy CRs are defined from the Trilio Management Console or from your own self-prepared YAML.
Scheduling Policies allow users to automate the backup of Kubernetes applications on a periodic basis. With this feature, users can create a scheduling policy that includes multiple cron strings to specify the frequency of backups.
Retention Policies make it easy for users to define the number of backups they want to retain and the rate at which old backups should be deleted. With the retention policy CR, users can use a simple YAML specification to define the number of backups to retain in terms of days, weeks, months, years, or the latest backup. This provides a flexible and customizable way to manage your backup retention policy and ensure you meet your compliance requirements.
The Backup CR is defined from the Trilio Management Console or from your own self-prepared YAML.
The backup object references the actual backup Trilio creates on the Target. The backup is taken as either a Full or Incremental backup as defined by the user in the Backup CR.
Trilio makes it easy to automatically create your backup plans and all required target and policy CRDs from the Management Console.
Take control of Trilio, define your self-prepared YAML, and apply it to the cluster using the kubectl tool.
A Restore CR (Custom Resource) is defined from the Trilio Management Console or from your own self-prepared YAML. The Restore CR references a backup object which has been created previously from a Backup CR.
In a Migration scenario, the location of the backup should be specified within the desired target as there will be no Backup CR defining the location.
Trilio restores the backup into a specified namespace and upon completion of the restore operation, the application is ready to be used on the cluster.
Trilio makes it easy to automatically create your Restore CRDs from the Management Console.
Take control of Trilio, define your self-prepared YAML, and apply it to the cluster using the kubectl tool.
Before installing Trilio for Kubernetes, please review the to ensure Trilio can function smoothly in your Kubernetes environment.
Check the to select a driver appropriate for your backend storage solution. See the selected CSI driver's documentation for details on the installation of the driver in your cluster.
Trilio will assume that the selected storage driver is a supported CSI driver when the and are utilized.
. This is compatible with v1.22+.
Make sure your cluster is ready to Install Trilio for Kubernetes by installing the and running the .
Google's Kubernetes Engine (GKE) utilizes the flexibility of upstream Kubernetes. Consequently, the same documentation provided for installing Trilio for Kubernetes in environments are applicable for the T4K on GKE.
1. Obtain a license by getting in touch with us . The license file will contain the license key.
If you have already executed the above prerequisites, then refer to the guide for applying a license in the UI:
with a service account whose access key and secret key is going to be used while creating target in T4K
If a service account does not have access key and secret key, to generate a new access key and secret key which will be required while creating target.
Learn how to
GCP Storage URI:
See more
Trilio is a cloud-native application for Kubernetes, therefore all operations are managed with CRDs (Custom Resource Definitions). We will discuss the purpose of each Trilio CRD and provide examples of how to create these objects Automatically in the Trilio Management Console or from the tool.
Learn more about
See more
Learn more about
See more
Problems? Learn about