A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/hyperdisk below:

Scale your storage performance with Hyperdisk | Google Kubernetes Engine (GKE)

The Compute Engine Persistent Disk CSI driver is the primary way for you to access Hyperdisk storage with Google Kubernetes Engine (GKE) clusters.

Note: Hyperdisk support is based on the machine type of your nodes. For the most up-to-date information, see Machine type support in the Compute Engine documentation. Before you begin

Before you start, make sure you have performed the following tasks:

Requirements

To use Hyperdisk volumes in GKE, your clusters must meet the following requirements:

Create a Hyperdisk volume for GKE

This section provides an overview of creating a Hyperdisk volume backed by the Compute Engine CSI driver in GKE.

Note: When you create the PersistentVolumeClaim associated with the StorageClass, GKE automatically creates the underlying Google Cloud Hyperdisk backing storage and attaches the storage to a node. You don't need to separately create and attach Google Cloud Hyperdisk storage to your nodes. Create a StorageClass

The following Persistent Disk storage Type fields are provided by the Compute Engine Persistent Disk CSI driver to support Hyperdisk:

To create a new StorageClass with the throughput or IOPS level you want, use pd.csi.storage.gke.io in the provisioner field, and specify one of the Hyperdisk storage types.

Each Hyperdisk type has default values for performance determined by the initial disk size provisioned. When creating the StorageClass, you can optionally specify the following parameters depending on your Hyperdisk type. If you omit these parameters, GKE uses the capacity based disk type defaults instead. For guidance on allowable values for throughput or IOPS, see Plan the performance level for your Hyperdisk volume.

Parameter Hyperdisk Type Usage provisioned-throughput-on-create Hyperdisk Balanced*, Hyperdisk Balanced High Availability, Hyperdisk Throughput Express the throughput value in MiB/s using the "Mi" qualifier; for example, if your required throughput is 250 MiB/s, specify "250Mi" when creating the StorageClass. provisioned-iops-on-create Hyperdisk Balanced, Hyperdisk Balanced High Availability, Hyperdisk Extreme The IOPS value should be expressed without any qualifiers; for example, if you require 7,000 IOPS, specify "7000" when creating the StorageClass.

The following examples show how you can create a StorageClass for each Hyperdisk type:

Hyperdisk Balanced
  1. Save the following manifest in a file named hdb-example-class.yaml:

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: balanced-storage
    provisioner: pd.csi.storage.gke.io
    volumeBindingMode: WaitForFirstConsumer
    allowVolumeExpansion: true
    parameters:
      type: hyperdisk-balanced
      provisioned-throughput-on-create: "250Mi"
      provisioned-iops-on-create: "7000"
    
  2. Create the StorageClass:

    kubectl create -f hdb-example-class.yaml
    
Hyperdisk Throughput
  1. Save the following manifest in a file named hdt-example-class.yaml:

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: throughput-storage
    provisioner: pd.csi.storage.gke.io
    volumeBindingMode: WaitForFirstConsumer
    allowVolumeExpansion: true
    parameters:
      type: hyperdisk-throughput
      provisioned-throughput-on-create: "50Mi"
    
  2. Create the StorageClass:

    kubectl create -f hdt-example-class.yaml
    
Hyperdisk Extreme
  1. Save the following manifest in a file named hdx-example-class.yaml:

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: extreme-storage
    provisioner: pd.csi.storage.gke.io
    volumeBindingMode: WaitForFirstConsumer
    allowVolumeExpansion: true
    parameters:
      type: hyperdisk-extreme
      provisioned-iops-on-create: "50000"
    
  2. Create the StorageClass:

    kubectl create -f hdx-example-class.yaml
    
Hyperdisk Balanced HA
  1. Save the following manifest in a file named hdb-ha-example-class.yaml.

    For more information on supported zones, see hyperdisk regional availability.

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
      name: balanced-ha-storage
    provisioner: pd.csi.storage.gke.io
    volumeBindingMode: WaitForFirstConsumer
    allowVolumeExpansion: true
    parameters:
      type: hyperdisk-balanced-high-availability
      provisioned-throughput-on-create: "250Mi"
      provisioned-iops-on-create: "7000"
    allowedTopologies:
    - matchLabelExpressions:
      - key: topology.gke.io/zone
        values:
        - ZONE1
        - ZONE2
    
  2. Create the StorageClass:

    kubectl create -f hdb-ha-example-class.yaml
    

To find the name of the StorageClasses available in your cluster, run the following command:

kubectl get sc
Create a PersistentVolumeClaim

You can create a PersistentVolumeClaim that references the Compute Engine Persistent Disk CSI driver's StorageClass.

Hyperdisk Balanced

In this example, you specify the targeted storage capacity of the Hyperdisk Balanced volume as 20 GiB.

  1. Save the following PersistentVolumeClaim manifest in a file named pvc-example.yaml:

    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: podpvc
    spec:
      accessModes:
      - ReadWriteOnce
      storageClassName: balanced-storage
      resources:
        requests:
          storage: 20Gi
    
  2. Apply the PersistentVolumeClaim that references the StorageClass you created from the earlier example:

    kubectl apply -f pvc-example.yaml
    
Hyperdisk Throughput

In this example, you specify the targeted storage capacity of the Hyperdisk Throughput volume as 2 TiB.

  1. Save the following PersistentVolumeClaim manifest in a file named pvc-example.yaml:

    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: podpvc
    spec:
      accessModes:
      - ReadWriteOnce
      storageClassName: throughput-storage
      resources:
        requests:
          storage: 2Ti
    
  2. Apply the PersistentVolumeClaim that references the StorageClass you created from the earlier example:

    kubectl apply -f pvc-example.yaml
    
Hyperdisk Extreme

In this example, you specify the minimum storage capacity of the Hyperdisk Extreme volume as 64 GiB.

  1. Save the following PersistentVolumeClaim manifest in a file named pvc-example.yaml:

    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: podpvc
    spec:
      accessModes:
      - ReadWriteOnce
      storageClassName: extreme-storage
      resources:
        requests:
          storage: 64Gi
    
  2. Apply the PersistentVolumeClaim that references the StorageClass you created from the earlier example:

    kubectl apply -f pvc-example.yaml
    
Hyperdisk Balanced HA

In this example, you specify the minimum storage capacity of the Hyperdisk Balanced High Availability volume as 20 GiB and the access mode as ReadWriteOnce. Hyperdisk Balanced High Availability also supports access modes of ReadWriteMany and ReadWriteOncePod. For differences and use cases of each access mode, see Persistent Volume Access Modes.

  1. Save the following PersistentVolumeClaim manifest in a file named pvc-example.yaml:

    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: podpvc
    spec:
      accessModes:
      - ReadWriteOnce
      storageClassName: balanced-ha-storage
      resources:
        requests:
          storage: 20Gi
    
  2. Apply the PersistentVolumeClaim that references the StorageClass you created from the earlier example:

    kubectl apply -f pvc-example.yaml
    
Create a Deployment to consume the Hyperdisk volume

When using Pods with PersistentVolumes, we recommend that you use a workload controller (such as a Deployment or StatefulSet).

  1. The following example creates a manifest that configures a Pod for deploying a Nginx web server using the PersistentVolumeClaim created in the previous section. Save the following example manifest as hyperdisk-example-deployment.yaml:

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: web-server-deployment
      labels:
        app: nginx
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: nginx
      template:
        metadata:
          labels:
            app: nginx
        spec:
          containers:
          - name: nginx
            image: nginx
            volumeMounts:
            - mountPath: /var/lib/www/html
              name: mypvc
          volumes:
          - name: mypvc
            persistentVolumeClaim:
              claimName: podpvc
              readOnly: false
    
  2. To create a Deployment based on the hyperdisk-example-deployment.yaml manifest file, run the following command:

    kubectl apply -f hyperdisk-example-deployment.yaml
    
  3. Confirm the Deployment was successfully created:

    kubectl get deployment
    

    It might take a few minutes for Hyperdisk instances to complete provisioning. When the deployment completes provisioning, it reports a READY status.

  4. You can check the progress by monitoring your PersistentVolumeClaim status by running the following command:

    kubectl get pvc
    
Provision a Hyperdisk volume from a snapshot

To create a new Hyperdisk volume from an existing Persistent Disk snapshot, use the Google Cloud console, the Google Cloud CLI, or the Compute Engine API. To learn how to create a Persistent Disk snapshot, see Creating and using volume snapshots.

Console
  1. Go to the Disks page in the Google Cloud console.

    Go to Disks

  2. Click Create Disk.

  3. Under Disk Type, choose one of the following for disk type:

  4. Under Disk source type, click Snapshot.

  5. Select the name of the snapshot to restore.

  6. Select the size of the new disk, in GiB. This number must be equal to or larger than the original source disk for the snapshot.

  7. Set the Provisioned throughput or Provisioned IOPS you want for the disk, if different from the default values.

  8. Click Create to create the Hyperdisk volume.

gcloud

Run the gcloud compute disks create command to create the Hyperdisk volume from a snapshot.

Hyperdisk Balanced
gcloud compute disks create DISK_NAME \
    --size=SIZE \
    --source-snapshot=SNAPSHOT_NAME \
    --provisioned-throughput=TRHROUGHPUT_LIMIT \
    --provisioned-iops=IOPS_LIMIT \
    --type=hyperdisk-balanced

Replace the following:

Hyperdisk Throughput
gcloud compute disks create DISK_NAME \
    --size=SIZE \
    --source-snapshot=SNAPSHOT_NAME \
    --provisioned-throughput=TRHROUGHPUT_LIMIT \
    --type=hyperdisk-throughput

Replace the following:

Hyperdisk Extreme
gcloud compute disks create DISK_NAME \
    --size=SIZE \
    --source-snapshot=SNAPSHOT_NAME \
    --provisioned-iops=IOPS_LIMIT \
    --type=hyperdisk-extreme

Replace the following:

Hyperdisk Balanced HA
gcloud compute disks create DISK_NAME \
    --size=SIZE \
    --region=REGION \
    --replica-zones=('ZONE1', 'ZONE2') \
    --source-snapshot=SNAPSHOT_NAME \
    --provisioned-throughput=TRHROUGHPUT_LIMIT \
    --provisioned-iops=IOPS_LIMIT \
    --type=hyperdisk-balanced-high-availability

Replace the following:

Create a snapshot for a Hyperdisk volume

To create a snapshot from a Hyperdisk volume, follow the same steps as creating a snapshot for a Persistent Disk volume:

Update the provisioned throughput or IOPS of an existing Hyperdisk volume

This section covers how to modify provisioned performance for Hyperdisk volumes.

Throughput

Updating the provisioned throughput is supported for Hyperdisk Balanced, Hyperdisk Balanced High Availability and Hyperdisk Throughput volumes only.

To update the provisioned throughput level of your Hyperdisk volume, follow the Google Cloud console, gcloud CLI, or Compute Engine API instructions in Changing the provisioned performance for a Hyperdisk volume.

You can change the provisioned throughput level (up to once every 4 hours) for a Hyperdisk volume after volume creation. New throughput levels might take up to 15 minutes to take effect. During the performance change, any performance SLA and SLO are not in effect. You can change the throughput level of an existing volume at any time, regardless of whether the disk is attached to a running instance or not.

The new throughput level you specify must adhere to the supported values for Hyperdisk Balanced, Hyperdisk Throughput and Hyperdisk Balanced High Availability volumes, respectively.

To update the provisioned throughput level for a Hyperdisk volume, you must identify the name of the Persistent Disk backing your PersistentVolumeClaim and PersistentVolume resources:

  1. Go to the Object browser in the Google Cloud console.

    Go to Object Browser

  2. Find the entry for your PersistentVolumeClaim object.

  3. Click the Volume link .

  4. Open the YAML tab of the associated PersistentVolume. Locate the CSI volumeHandle value in this tab.

  5. Note the last element of this handle (it should have a value like "pvc-XXXXX"). This is the name of your PersistentVolumeClaim. You should also take note of the project and zone.

IOPS

Updating the provisioned IOPS is supported for Hyperdisk Balanced, Hyperdisk Balanced High Availability and Hyperdisk Extreme volumes only.

To update the provisioned IOPS level of your Hyperdisk volume, follow the Google Cloud console, gcloud CLI, or Compute Engine API instructions in Changing the provisioned performance for a Hyperdisk volume.

You can change the provisioned IOPS level (up to once every 4 hours) for a Hyperdisk IOPS volume after volume creation. New IOPS levels might take up to 15 minutes to take effect. During the performance change, any performance SLA and SLO are not in effect. You can change the IOPS level of an existing volume at any time, regardless of whether the disk is attached to a running instance or not.

The new IOPS level you specify must adhere to the supported values for Hyperdisk Balanced or Hyperdisk Extreme volumes, respectively.

To update the provisioned IOPS level for a Hyperdisk volume, you must identify the name of the Persistent Disk backing your PersistentVolumeClaim and PersistentVolume resources:

  1. Go to the Object browser in the Google Cloud console.

    Go to Object Browser

  2. Find the entry for your PersistentVolumeClaim object.

  3. Click the Volume link .

  4. Open the YAML tab of the associated PersistentVolume. Locate the CSI volumeHandle value in this tab.

  5. Note the last element of this handle (it should have a value like "pvc-XXXXX"). This is the name of your PersistentVolumeClaim. You should also take note of the project and zone.

Monitor throughput or IOPS on a Hyperdisk volume

To monitor the provisioned performance of your Hyperdisk volume, see Analyze provisioned IOPS and throughput in the Compute Engine documentation.

Troubleshooting

This section provides troubleshooting guidance to resolve issues with Hyperdisk volumes on GKE.

Cannot change performance or capacity: ratio out of range

The following error occurs when you attempt to change the provisioned performance level or capacity, but the performance level or capacity that you picked is outside of the range that is acceptable for the volume:

The throughput provisioned for Hyperdisk Throughput volumes must meet the following requirements:

To resolve this issue, correct the requested throughput or capacity to be within the allowable range and reissue the command.

Cannot change performance: rate limited

The following error occurs when you attempt to change the provisioned performance level, but the performance level has already been changed within the last 4 hours:

Cannot update provisioned throughput due to being rate limited.
Cannot update provisioned iops due to being rate limited.

Hyperdisk Throughput and IOPS volumes can have their provisioned performance updated once every 4 hours. To resolve this issue, wait for the cool-down timer for the volume to elapse, and then reissue the command.

What's next

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4