Openshift 4.2是一种容器应用平台,而OCS(Openshift Container Storage)是一种为容器化应用程序提供可扩展存储的解决方案。在Openshift 4.2预发布群集上安装OCS的步骤如下:
$ oc create -f https://operatorhub.io/install/ocs-operator.yaml
$ oc create -f - <<EOF
apiVersion: local.storage.openshift.io/v1
kind: LocalVolume
metadata:
name: ocs-deviceset
namespace: openshift-storage
spec:
storageClassDevices:
- devicePaths:
- /dev/sdb
- /dev/sdc
storageClassName: ocs-storagecluster-ceph-rbd
volumeMode: Block
fsType: xfs
EOF
$ oc create -f - <<EOF
apiVersion: rook.io/v1beta1
kind: CephCluster
metadata:
name: ocs-storagecluster
namespace: openshift-storage
spec:
cephVersion:
image: ceph/ceph:v14.2.7-20200115
allowUnsupported: true
dataDirHostPath: /var/lib/rook
mon:
count: 3
allowMultiplePerNode: true
storage:
useAllDevices: true
deviceFilter:
labels:
- purpose=local-storage
useAllDevicesForMetadata: false
metadataDevice:
config:
databaseSizeMB: "1024"
journalSizeMB: "1024"
directories:
- path: /var/lib/rook
EOF
完成上述步骤后,您将在Openshift 4.2预发布群集上成功安装了OCS(Openshift Container Storage)。
OCS的优势:
OCS的应用场景:
腾讯云相关产品推荐:
请注意,以上推荐的腾讯云产品仅供参考,您也可以根据自己的实际需求选择其他适合的产品。
领取专属 10元无门槛券
手把手带您无忧上云