Created
March 30, 2020 16:42
-
-
Save klizhentas/8427a04ebf4f85d7bc1bc49f17ee05aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OpenEBS storage pool claim. | |
apiVersion: openebs.io/v1alpha1 | |
kind: StoragePoolClaim | |
metadata: | |
name: cstor-pool | |
spec: | |
name: cstor-pool | |
type: disk | |
poolSpec: | |
poolType: striped | |
blockDevices: | |
# List of devices detected by OpenEBS to put into the pool. | |
blockDeviceList: | |
# - blockdevice-8064e98edba7e57141daab4800ecd792 | |
--- | |
# Storage class for OpenEBS cStor volumes. | |
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: openebs-cstor | |
annotations: | |
openebs.io/cas-type: cstor | |
cas.openebs.io/config: | | |
- name: StoragePoolClaim | |
value: "cstor-pool" | |
- name: ReplicaCount | |
value: "1" | |
# Note the OpenEBS iSCSI provisioner. | |
provisioner: openebs.io/provisioner-iscsi | |
--- | |
# Request to a cStor volume. | |
kind: PersistentVolumeClaim | |
apiVersion: v1 | |
metadata: | |
name: claim-cstor | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 1Gi | |
# Note we're using storage class defined above to use cStor provisioner. | |
storageClassName: openebs-cstor | |
apiVersion: v1 | |
--- | |
# Pod that uses the above volume. | |
kind: Pod | |
metadata: | |
name: nginx-cstor | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx | |
volumeMounts: | |
- name: local-vol | |
mountPath: /data | |
volumes: | |
- name: local-vol | |
persistentVolumeClaim: | |
claimName: claim-cstor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment