Skip to content

GcpNfsVolume Custom Resource ​

The gcpnfsvolume.cloud-resources.kyma-project.io custom resource (CR) describes the GCP Filestore instance that can be used as a ReadWriteMany (RWX) volume in the cluster. Once the GCP Filestore instance is provisioned in the underlying cloud provider subscription, also the corresponding PersistentVolume (PV) and PersistentVolumeClaim (PVC) are created in the RWX mode, so they can be used from multiple cluster workloads. To use the GcpNfsVolume CR as a volume in the cluster workload, specify the workload volume of the persistentVolumeClaim type. A created GcpNfsVolume can be deleted only where there are no workloads that are using it, and when PV and PVC are unbound.

IP Address Requirements ​

The zonal GCP Filestore requires 8 and the regional GCP Filestore requires 64 IP addresses. To learn more, read Configure a reserved IP address range. Those IP addresses are allocated from the IpRange CR. If an IpRange CR is not specified in the GcpNfsVolume, then the default IpRange is used. If a default IpRange does not exist, it is automatically created. Manually create a non-default IpRange with specified Classless Inter-Domain Routing (CIDR) and use it only in advanced cases of network topology when you want to be in control of the network segments in order to avoid range conflicts with other networks.

Tier Selection and Capacity Planning ​

You must specify the GcpNfsVolume capacity according to your tier selection. The tier field defaults to BASIC_HDD and can be one of BASIC_HDD, BASIC_SSD, ZONAL, or REGIONAL. Legacy tiers are not supported.

Each tier has specific capacity requirements and constraints:

TierMin CapacityMax CapacityScalability RulesCapacity Changes
BASIC_HDD1024 GiB65,433 GiBAny value in rangeCan be increased only (immutable downwards)
BASIC_SSD2560 GiB65,433 GiBAny value in rangeCan be increased only (immutable downwards)
ZONAL1024 GiB102,400 GiB1024-9984: divisible by 256
10240-102400: divisible by 2560
Can be increased or decreased
REGIONAL1024 GiB102,400 GiB1024-9984: divisible by 256
10240-102400: divisible by 2560
Can be increased or decreased

Examples of valid capacities:

  • BASIC_HDD: 1024, 1500, 2560, 65433
  • BASIC_SSD: 2560, 3000, 10000
  • ZONAL/REGIONAL: 1024, 1280 (1024+256), 1536 (1024+512), 10240, 12800 (10240+2560)

For more information, see GCP Filestore service tiers.

PersistentVolume and PersistentVolumeClaim Management ​

By default, the created PV and PVC have the same name as the GcpNfsVolume resource, but you can optionally specify their names, labels and annotations if needed. If PV or PVC already exist with the same name as the one being created, the provisioned GCP Filestore remains and the GcpNfsVolume is put into the Error state.

Specification ​

This table lists the parameters of the given resource together with their descriptions:

Spec:

ParameterTypeRequiredImmutableDescription
ipRangeobjectNoYesIpRange reference. If omitted, the default IpRange is used. If the default IpRange does not exist, it will be created automatically.
ipRange.namestringYes*YesName of the existing IpRange to use. *Required if ipRange is specified.
capacityGbintYesPartialCapacity of the volume in GiB. Must meet tier-specific requirements (see capacity table above). Note: BASIC_HDD and BASIC_SSD can only be increased. ZONAL and REGIONAL can be increased or decreased within tier constraints.
locationstringNoYesDeprecated. This field is no longer used and will be removed in a future version. The location is always determined automatically based on the cluster region or one of its zones depending on the tier.
tierstringNoYesThe GCP Filestore tier configuration option. Defaults to BASIC_HDD. Must be one of: BASIC_HDD, BASIC_SSD, ZONAL, or REGIONAL. Each tier has different capacity requirements and file share name length limits. For more information, see Service tiers.
fileShareNamestringNoYesThe name of the file share. Defaults to vol1. Must match pattern ^[a-z][a-z0-9_]*[a-z0-9]$. Maximum length: 16 characters for BASIC tiers, 63 characters for ZONAL/REGIONAL tiers.
sourceBackupobjectNoYesSource backup for restoring an existing backup while creating a new Filestore instance. The capacity must be equal to or greater than the source Filestore's capacity. Tier limitations also apply. Mutually exclusive with sourceBackupUrl. See GcpNfsVolumeRestore.
sourceBackup.namestringYes*YesName of the source GcpNfsVolumeBackup. *Required if sourceBackup is specified.
sourceBackup.namespacestringYes*YesNamespace of the source GcpNfsVolumeBackup. *Required if sourceBackup is specified.
sourceBackupUrlstringNoYesDirect URL to a backup in the format <project>/<location>/<instance>/<backup>. Mutually exclusive with sourceBackup. Must match pattern ^(.+)/(.+)$.
volumeobjectNoNoPersistentVolume options. Optional.
volume.namestringNoNoPersistentVolume name. Defaults to the name of the GcpNfsVolume resource.
volume.labelsmap[string]stringNoNoPersistentVolume labels. Defaults to nil.
volume.annotationsmap[string]stringNoNoPersistentVolume annotations. Defaults to nil.
volumeClaimobjectNoNoPersistentVolumeClaim options. Optional.
volumeClaim.namestringNoYesPersistentVolumeClaim name. Defaults to the name of the GcpNfsVolume resource. Cannot be changed after creation.
volumeClaim.labelsmap[string]stringNoNoPersistentVolumeClaim labels. Defaults to nil.
volumeClaim.annotationsmap[string]stringNoNoPersistentVolumeClaim annotations. Defaults to nil.

Status:

ParameterTypeDescription
state (required)stringCurrent state of the GcpNfsVolume. Possible values: Ready, Processing, Creating, Updating, Deleting, or Error.
idstringThe GCP Filestore instance ID.
hosts[]stringList of NFS hosts (DNS names or IP addresses) that clients can use to connect to the volume.
locationstringThe location where the volume is provisioned (automatically determined based on cluster region/zones and tier).
capacityquantityThe provisioned capacity of the volume. Matches spec.capacityGb when provisioning or capacity changes are complete.
protocolstringThe NFS protocol used (typically NFSv3).
conditions[]objectCurrent conditions of the resource. Used for detailed status tracking.
conditions.lastTransitionTimestringTimestamp of the last condition status change.
conditions.messagestringHuman-readable message providing details about the condition status change.
conditions.reasonstringMachine-readable reason for the condition status change (e.g. IpRangeNotReady).
conditions.status (required)stringStatus of the condition. Possible values: True, False, or Unknown.
conditions.typestringType of condition (e.g., Ready, Error).

Sample Custom Resources ​

Basic Example with Default Settings ​

This example creates a basic HDD volume with the minimum required configuration:

yaml
apiVersion: cloud-resources.kyma-project.io/v1beta1
kind: GcpNfsVolume
metadata:
  name: my-basic-volume
spec:
  capacityGb: 1024  # Minimum for BASIC_HDD tier
---
apiVersion: v1
kind: Pod
metadata:
  name: basic-workload
spec:
  volumes:
    - name: data
      persistentVolumeClaim:
        claimName: my-basic-volume
  containers:
    - name: workload
      image: nginx
      volumeMounts:
        - mountPath: "/mnt/data"
          name: data

High-Performance SSD Volume ​

This example creates a high-performance SSD volume with custom PV/PVC names:

yaml
apiVersion: cloud-resources.kyma-project.io/v1beta1
kind: GcpNfsVolume
metadata:
  name: my-ssd-volume
spec:
  tier: BASIC_SSD
  capacityGb: 2560  # Minimum for BASIC_SSD tier
  fileShareName: ssdshare
  volume:
    name: custom-pv-name
    labels:
      environment: production
      tier: ssd
  volumeClaim:
    name: custom-pvc-name
    labels:
      environment: production

Regional Volume for High Availability ​

This example creates a regional volume with proper capacity alignment:

yaml
apiVersion: cloud-resources.kyma-project.io/v1beta1
kind: GcpNfsVolume
metadata:
  name: my-regional-volume
spec:
  tier: REGIONAL
  capacityGb: 1280  # 1024 + 256 (divisible by 256)
  fileShareName: regional_share_001
  ipRange:
    name: my-custom-range

Zonal Volume with Large Capacity ​

This example creates a zonal volume with capacity in the upper range:

yaml
apiVersion: cloud-resources.kyma-project.io/v1beta1
kind: GcpNfsVolume
metadata:
  name: my-large-volume
spec:
  tier: ZONAL
  capacityGb: 12800  # 10240 + 2560 (divisible by 2560 in upper range)
  fileShareName: large_zonal_share