Skip to content

KOP Cluster Templates

A Cluster Template is a preset configuration that can be used to replicate infrastructure resources. The controller allows the Infra Admin to create Cluster Templates, enabling to abstract the details of the resource creation by exposing limited configuration. Both Infra Admin and Cluster Admin can use these templates to create GKE clusters.

A cluster template can be used to preconfigure and limit the configuration details available to users when provisioning a cluster. Templates can be used to restrict or enforce infrastructure configurations within an environment.

Explore our blog for deeper insights on Cluster Templates, available here!

Automation Options

The below matrix presents a breakdown of actions like creation, updating, and deletion of GKE Cluster Template across multiple deployment methods: Interactive UI, Declarative RCTL commands, API-driven automation, and Terraform.

Actions UI CLI API Terraform
Create Cluster Template Yes Yes Yes No
Share/Edit Yes Yes Yes No
Delete Yes Yes Yes No

Step 1: New Cluster Template

To create a new cluster template, perform the below procedure:

  • Login to the controller and click Cluster Templates.
  • Click New Template.
  • Enter the Cluster Name and optionally provide the Description.
  • Click Create.

New Cluster Template

The cluster templates are version-controlled so that the lifecycle can be properly managed. In this example, the admin has not yet configured anything. So, no versions are available yet.

Cluster Template No Versions


Step 2. New Version

  • Click New Version and use the wizard to provide details.
  • Provide a version number/name.

Notes

  • When creating a new version of a cluster template in the Console, the settings from the previous version are loaded on to the page. This allows users to make adjustments to an existing cluster template configuration.
  • Refer to the GKE Schema for more information about the cluster template configuration.

General (Mandatory)

  • Select the GCP credentials from the drop-down. See Credentials for GCP GKE for creating credentials.
  • Select a location type, zone, and K8s version.
  • Select a Blueprint and Version. See Blueprints for creating blueprints.
  • Select a location. Add additional locations, if needed.

Cluster Template General

Override Options

Use the Override option if required.

Override Description
Allowed Allows the users to provide any value.
Not Allowed Users are not allowed to override the values defined in the template.
Allow Limited Allows adding one or more values (like regions) to a restricted list. When creating a cluster from a template, the user can only select the values defined in the restricted list.

Network Settings

  • Set the network name and node subnet

If using the VPC Network of the same project, the values are set to default. To utilize the shared VPC Network (shared by host projects via GKE Console), provide the shared network paths for Network Name and Node Subnet Name as illustrated below.

Note

Use the name for the network and node subnet. Do not use the CIDR.

  • Select a cluster privacy setting
  • Set the control plane IP range
  • Set access controls and other network settings
  • Provide the Pod Secondary CIDR Range (Name) reserved in the VPC network. Mandatory if shared VPC Network used
  • Provide the Service Secondary CIDR Range (Name) reserved in the VPC network. Mandatory if shared VPC Network used
  • Add control plane authorized networks, if needed

Network Settings

Node Pools

  • Add node pools, if needed.

Note

The GKE node pools specified in a cluster template are all that will be available to the cluster. Once a cluster is created from a template, adding and deleting node pools to that cluster is not allowed. Make sure the cluster template has the desired node pools attached before creating a cluster.

Node Pool Settings

Security Settings

  • Select workload identity, RBAC, and other security settings.

Security Settings

Feature Settings

  • Select feature settings, like logging and monitoring.

Feature Settings

Advanced Settings

  • Select pre-bootstrap commands and enable a proxy.

Advanced Settings

  • Click SAVE CHANGES to complete the cluster template creation.

View Versions

The entire history of cluster template versions is maintained on the Controller. Admins can view details about the versions of cluster templates.

Template Version List


View/ Share/ Edit/ Delete/ Cluster Templates

As an Admin, login to the Controller.

  • Select Project.

  • Navigate to Infrastructure -> Cluster Templates. The dashboard shows the list of templates available within this project. A cluster template can be used for creating one or more cluster(s).

  • Click the share icon to share a cluster template to all projects or a specific project.

    • Users cannot share a cluster template from a project to other project(s) if the cluster template name is identical in any other project(s).
    • Once a cluster template is mapped to a cluster, it cannot be unassigned/unshared from that cluster specific project.
    • When sharing a cluster template to a project, user must also share the blueprint and cloud credential associated with that specific cluster template.
  • To edit an existing template and add a new version, click Edit icon.

  • Click Delete icon to delete an existing template.

Templates List

Note

Users cannot share/edit/delete a cluster template that are inherited from other project. Also, cannot delete a cluster template which is associated with a cluster.

  • Click the Clusters count to view the list of clusters and their respective cluster template version.

Templates List