Skip to content

Instantly share code, notes, and snippets.

@SteaceP
Created December 25, 2020 02:33
Show Gist options
  • Save SteaceP/26a7da2b3a4cf00410afa6ece4756f35 to your computer and use it in GitHub Desktop.
Save SteaceP/26a7da2b3a4cf00410afa6ece4756f35 to your computer and use it in GitHub Desktop.
k3s Storage Class
apiVersion: v1
kind: Secret
metadata:
name: ceph-admin-secret
namespace: kube-system
type: "kubernetes.io/rbd"
data:
# ceph auth get-key client.admin | base64
key: <your output from above>
---
apiVersion: v1
kind: Secret
metadata:
name: ceph-secret
namespace: kube-system
type: "kubernetes.io/rbd"
data:
# ceph auth get-key client.kube | base64
key: <your output from above>
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: ceph
provisioner: kubernetes.io/rbd
parameters:
monitors: <mon-ip-1>:6789,<mon-ip-2>:6789,<mon-ip-3>:6789
adminId: admin
adminSecretName: ceph-admin-secret
adminSecretNamespace: kube-system
pool: ssd_pool
userId: kube
userSecretName: ceph-secret
userSecretNamespace: kube-system
fsType: ext4
imageFormat: "2"
imageFeatures: "layering"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment