Enable Backup for GKE API

Autopilot Standard

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 thegcloud components update command. 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/zone instead. 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.com

Console

In the Google Cloud console, enable the Backup for GKE API:

Enable the 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

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.