1.环境准备:
kubernetes环境安装完成,如没有安装可参考:kubernetes单节点安装_闫利朋的博客-优快云博客
kubevirt环境安装完成,如没有安装可参考:
kubernetes安装kubevirt提供虚拟机功能(一)_闫利朋的博客-优快云博客
确认分区或设备文件系统是否格式化:
# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 vfat 2747-4FB6 /boot/efi
├─sda2 xfs f8093fc3-9851-4030-9e9c-22609686763b /boot
└─sda3 LVM2_member EyMCMm-nGBs-D22f-8w0e-pZLJ-4QGk-GDAhrp
├─centos-root xfs 24a4c7a3-7f57-488b-8004-a8f988e97e54 /
└─centos-swap swap 7c1714cb-c9a8-4be9-bd43-5ff9ff10969b
sdb
sdc
sdd
sde
如果该FSTYPE字段不为空,则表示该文件系统未完全清空,需要操作如下脚本:
# vim clean.sh
DISK="/dev/sde" #根据自己系统磁盘名称修改
# Zap the disk to a fresh, usable state (zap-all is important, b/c MBR has to be clean)
sgdisk --zap-all $DISK
# Wipe a large portion of the beginning of the disk to remove more LVM metadata that may be present
dd if=/dev/zero of="$DISK" bs=1M count=100 oflag=direct,dsync
# SSDs may be better cleaned with blkdiscard instead of dd
blkdiscard $DISK
# Inform the OS of partition table changes
partprobe $DISK
2.ceph安装:
相关资源下载:rook-1.8.7相关资源-kubernetes文档类资源-优快云下载
# git clone --single-branch --branch v1.8.7 https://github.com/rook/rook.git
# cd rook/deploy/examples/
# kubectl create -f crds.yaml -f common.yaml -f operator.yaml
# kubectl create -f cluster.yaml
查看安装情况:
# kubectl get pod -n rook-ceph
NAME