k8s:services:local_storage_provider
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| k8s:services:local_storage_provider [2024/09/01 14:30] – created admin | k8s:services:local_storage_provider [2024/09/01 22:36] (current) – admin | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| For flatcar-linux we can follow the advice on the sig-storage-local-static-provisioner website: Mount formatted block storage on `/ | For flatcar-linux we can follow the advice on the sig-storage-local-static-provisioner website: Mount formatted block storage on `/ | ||
| - | 1. Create a block device for an acdh-clusterX node in vCenter. Note that the size of the block device should be a little larger than the desired even number if GiB (example: for a 20 GiB volume create a 21 GiB disk) as there is a difference in how disk size is calculated | + | 1. Create a block device for an acdh-clusterX node on the VM host. |
| - | 1. Format the volume on the respective flatcar node. Use ext4 or xfs depending on the needs of the service (for example elasticsearch/ | + | Note that the size of the block device should be a little larger than the desired even number if GiB (example: for a 20 GiB volume create a 21 GiB disk) as there is a difference in how disk size is calculated |
| - | < | + | 1. Format the volume on the respective flatcar node. Use ext4 or xfs depending on the needs of the service (for example elasticsearch/ |
| - | 1. reserved blocks for root are not very useful in kubernetes so set them to 0 | + | `sudo mkfs.ext4 /dev/sdd` |
| - | sudo tune2fs -r 0 / | + | 1. reserved blocks for root are not very useful in kubernetes so set them to 0 |
| - | 1. Get the UUID. It is part of the output of mkfs.ext4. It is also for example available using using @ls -l / | + | `sudo tune2fs -r 0 / |
| + | 1. Get the UUID. It is part of the output of mkfs.ext4. It is also for example available using using | ||
| + | `ls -l / | ||
| 1. Create a UUID directory in / | 1. Create a UUID directory in / | ||
| 1. Create a mount unit to mount the filesystem. The filename needs to match the mount point and is encoded. | 1. Create a mount unit to mount the filesystem. The filename needs to match the mount point and is encoded. | ||
| Line 32: | Line 34: | ||
| sudo systemctl enable " | sudo systemctl enable " | ||
| sudo systemctl start " | sudo systemctl start " | ||
| + | ``` | ||
| + | Add the `sig-storage-local-static-provisioner` | ||
| + | ```yaml | ||
| + | apiVersion: catalog.cattle.io/ | ||
| + | kind: ClusterRepo | ||
| + | metadata: | ||
| + | name: sig-storage-local-static-provisioner | ||
| + | spec: | ||
| + | url: https:// | ||
| ``` | ``` | ||
| `values.yaml` (also for rancher app) | `values.yaml` (also for rancher app) | ||
| ```yaml | ```yaml | ||
| + | additionalVolumeMounts: | ||
| + | additionalVolumes: | ||
| + | affinity: {} | ||
| classes: | classes: | ||
| - blockCleanerCommand: | - blockCleanerCommand: | ||
| - | - /scripts/blkdiscard.sh | + | - /scripts/shred.sh |
| - ' | - ' | ||
| fsType: ext4 | fsType: ext4 | ||
| Line 44: | Line 58: | ||
| namePattern: | namePattern: | ||
| volumeMode: Filesystem | volumeMode: Filesystem | ||
| - | storageClass: | + | enableWindows: false |
| - | common: | + | fullnameOverride: '' |
| - | additionalHostPathVolumes: | + | image: |
| - | mountDevVolume: | + | initContainers: |
| - | rbac: | + | mountDevVolume: |
| - | create: true | + | nameOverride: |
| - | pspEnabled: false | + | nodeSelector: |
| - | | + | nodeSelectorWindows: |
| - | | + | podAnnotations: |
| - | name: storage-local-static-provisioner | + | podLabels: {} |
| - | setPVOwnerRef: | + | privileged: |
| - | useAlphaAPI: | + | rbac: |
| - | useJobForCleaning: | + | |
| - | useNodeNameOnly: | + | resources: {} |
| - | configMapName: | + | serviceAccount: |
| - | podSecurityPolicy: | + | |
| - | daemonset: | + | |
| - | affinity: {} | + | |
| - | | + | |
| - | initContainers: | + | |
| - | nodeSelector: | + | |
| - | podAnnotations: | + | |
| - | podLabels: {} | + | |
| - | privileged: | + | |
| - | resources: {} | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| serviceMonitor: | serviceMonitor: | ||
| additionalLabels: | additionalLabels: | ||
| Line 78: | Line 81: | ||
| namespace: null | namespace: null | ||
| relabelings: | relabelings: | ||
| - | prometheus: | + | setPVOwnerRef: false |
| - | | + | tolerations: [] |
| - | | + | useJobForCleaning: false |
| - | | + | useNodeNameOnly: false |
| - | | + | ``` |
| - | | + | Now the DeamonSet created with this chart waits for a storage class. Import that using the following K8s definition: |
| - | | + | ```yaml |
| - | | + | apiVersion: storage.k8s.io/ |
| + | kind: StorageClass | ||
| + | metadata: | ||
| + | name: local-disks | ||
| + | provisioner: | ||
| + | reclaimPolicy: | ||
| + | volumeBindingMode: | ||
| ``` | ``` | ||
k8s/services/local_storage_provider.1725193844.txt.gz · Last modified: by admin