3 minute read
Using the GCP provider extension with Gardener as operator
core.gardener.cloud/v1beta1.CloudProfile resource declares a
providerConfig field that is meant to contain provider-specific configuration.
core.gardener.cloud/v1beta1.Seed resource is structured similarly.
Additionally, it allows configuring settings for the backups of the main etcds’ data of shoot clusters control planes running in this seed cluster.
This document explains the necessary configuration for this provider extension.
This section describes, how the configuration for
CloudProfiles looks like for GCP by providing an example
CloudProfile manifest with minimal configuration that can be used to allow the creation of GCP shoot clusters.
The cloud profile configuration contains information about the real machine image IDs in the GCP environment (image URLs).
You have to map every version that you specify in
.spec.machineImages.versions here such that the GCP extension knows the image URL for every version you want to offer.
CloudProfileConfig for the GCP extension looks as follows:
apiVersion: gcp.provider.extensions.gardener.cloud/v1alpha1 kind: CloudProfileConfig machineImages: - name: coreos versions: - version: 2135.6.0 image: projects/coreos-cloud/global/images/coreos-stable-2135-6-0-v20190801
If you want to allow that shoots can create VMs with local SSDs volumes then you have to specify the type of the disk with
SCRATCH in the
Please find below an example
apiVersion: core.gardener.cloud/v1beta1 kind: CloudProfile metadata: name: gcp spec: type: gcp kubernetes: versions: - version: 1.16.1 - version: 1.16.0 expirationDate: "2020-04-05T01:02:03Z" machineImages: - name: coreos versions: - version: 2135.6.0 machineTypes: - name: n1-standard-4 cpu: "4" gpu: "0" memory: 15Gi volumeTypes: - name: pd-standard class: standard - name: pd-ssd class: premium - name: SCRATCH class: standard regions: - region: europe-west1 names: - europe-west1-b - europe-west1-c - europe-west1-d providerConfig: apiVersion: gcp.provider.extensions.gardener.cloud/v1alpha1 kind: CloudProfileConfig machineImages: - name: coreos versions: - version: 2135.6.0 image: projects/coreos-cloud/global/images/coreos-stable-2135-6-0-v20190801
This provider extension does not support any provider configuration for the
However, it supports to managing of backup infrastructure, i.e., you can specify a configuration for the
A Seed of type
gcp can be configured to perform backups for the main etcds’ of the shoot clusters control planes using Google Cloud Storage buckets.
The location/region where the backups will be stored defaults to the region of the Seed (
spec.provider.region), but can also be explicitly configured via the field
The region of the backup can be different from where the seed cluster is running.
However, usually it makes sense to pick the same region for the backup bucket as used for the Seed cluster.
Please find below an example
Seed manifest (partly) that configures backups using Google Cloud Storage buckets.
--- apiVersion: core.gardener.cloud/v1beta1 kind: Seed metadata: name: my-seed spec: provider: type: gcp region: europe-west1 backup: provider: gcp region: europe-west1 # default region secretRef: name: backup-credentials namespace: garden ...
An example of the referenced secret containing the credentials for the GCP Cloud storage can be found in the example folder.
Permissions for GCP Cloud Storage
Please make sure the service account associated with the provided credentials has the following IAM roles.
Was this page helpful?