This page describes how to enable Backup for GKE.
Before you begin
Before you start, make sure you have performed the following tasks:
- Enable the Google Kubernetes Engine API. Enable Google Kubernetes Engine API
- If you want to use the Google Cloud CLI for this task,
install and then
initialize the
gcloud CLI. If you previously installed the gcloud CLI, get the latest
version by running
gcloud components update
.
Enable the Backup for GKE API
The Backup for GKE service is automatically enabled in any project where the GKE API is enabled. This lets you to improve the data protection posture of your GKE clusters by making use of the Backup for GKE service.
Enabling the Backup for GKE API alone doesn't modify any existing GKE cluster configurations or affect the running workloads. Also, it doesn't automatically create backups or incur additional costs. Costs are only incurred when you create and store backups using the Backup for GKE service.
If you manually disabled the Backup for GKE service, you can enable the Backup for GKE service by using the Google Cloud CLI, Google Cloud console, or Terraform.
gcloud
To enable the Backup for GKE service, run the following command:
gcloud services enable gkebackup.googleapis.com
Console
In the Google Cloud console, enable the Backup for GKE API:
Terraform
Create an appropriate "google_project_service"
resource to
enable the gkebackup.googleapis.com
service:
resource "google_project_service" "my_service" {
project = "my_project"
service = "gkebackup.googleapis.com"
}
For more information, see google_project_service.
What's next
- Learn more about defining custom backups.
- Learn more about planning a set of backups.