Skip to content

Latest commit

 

History

History
122 lines (99 loc) · 2.86 KB

File metadata and controls

122 lines (99 loc) · 2.86 KB

STACKIT CSI Driver User Documentation

Table of Contents

  1. Overview
  2. Key Features
  3. Basic Usage
  4. Configuration

Overview

The CSI driver enables dynamic provisioning and management of persistent volumes in Kubernetes using STACKIT's block storage services. It follows the CSI specification to ensure compatibility with Kubernetes and other container orchestration systems.

Key Features

  • Dynamic provisioning of persistent volumes
  • Volume snapshotting and restoration
  • Topology-aware volume placement
  • Integration with Kubernetes CSI sidecars
  • Volume encryption support
  • Volume expansion capabilities

Basic Usage

Create a StorageClass

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: stackit-block-storage
provisioner: block-storage.csi.stackit.cloud
parameters:
  type: "standard"  # or "premium" for higher performance
  availability: "zone1"  # specify your availability zone

Create a PersistentVolumeClaim

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: stackit-block-storage

Use the PVC in a Pod

apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
    - name: my-container
      image: nginx
      volumeMounts:
        - mountPath: "/data"
          name: my-volume
  volumes:
    - name: my-volume
      persistentVolumeClaim:
        claimName: my-pvc

Configuration

Topology Support

The driver supports topology-aware volume placement. The GetAZFromTopology function extracts the availability zone from topology requirements passed by Kubernetes.

Example topology requirement:

storageClass:
  volumeBindingMode: WaitForFirstConsumer
  allowedTopologies:
    - matchLabelExpressions:
        - key: topology.kubernetes.io/zone
          values:
            - zone1
            - zone2

Volume Encryption

The driver supports volume encryption with the following parameters:

  • encrypted: Boolean to enable encryption
  • kmsKeyID: KMS key ID for encryption
  • kmsKeyringID: KMS keyring ID
  • kmsKeyVersion: KMS key version
  • kmsServiceAccount: KMS service account

Example StorageClass with encryption:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: encrypted-storage
provisioner: block-storage.csi.stackit.cloud
parameters:
  encrypted: "true"
  kmsKeyID: "your-kms-key-id"
  kmsKeyringID: "your-keyring-id"
  kmsKeyVersion: "1"
  kmsServiceAccount: "your-service-account"