Enable Backup for GKE API Stay organized with collections Save and categorize content based on your preferences.
This page describes how to enableBackup for GKE.
Before you begin
Before you start, make sure that 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 theninitialize the gcloud CLI. If you previously installed the gcloud CLI, get the latest version by running the
gcloud components updatecommand. Earlier gcloud CLI versions might not support running the commands in this document.Note: For existing gcloud CLI installations, make sure to set thecompute/regionproperty. If you use primarily zonal clusters, set thecompute/zoneinstead. By setting a default location, you can avoid errors in the gcloud CLI like the following:One of [--zone, --region] must be supplied: Please specify location. You might need to specify the location in certain commands if the location of your cluster differs from the default that you set.
Enable the Backup for GKE API
The Backup for GKE service is automatically enabled in any project where theGKE API is enabled. This lets you to improve the data protectionposture of your GKE clusters by making use of theBackup for GKE service.
Enabling the Backup for GKE API alone doesn't modify any existing GKEcluster configurations or affect the running workloads. Also, it doesn'tautomatically create backups or incur additional costs. Costs are only incurredwhen you create and store backups using the Backup for GKE service.
If you manually disabled the Backup for GKEservice, you can enable the Backup for GKE service by using theGoogle Cloud CLI, Google Cloud console, or Terraform.
gcloud
To enable the Backup for GKE service, run the following command:
gcloudservicesenablegkebackup.googleapis.comConsole
In the Google Cloud console, enable the Backup for GKE API:
Terraform
Create an appropriate"google_project_service" resource toenable thegkebackup.googleapis.com service:
resource "google_project_service" "my_service" { project = "my_project" service = "gkebackup.googleapis.com"}For more information, seegoogle_project_service.
What's next
- Learn more aboutdefining custom backups.
- Learn more aboutplanning a set of backups.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.