Gluster安装+kubesphere3.0
IP地址(内网) |
配置 |
软件环境 |
---|---|---|
10.0.2.4 | 4H4G+40G内存+新建虚拟硬盘动态分配64G | GlusterFS,Heketi |
10.0.2.15 | 6H11G+40G内存+新建虚拟硬盘动态分配64G | GlusterFS |
10.0.2.5 | 6H11G+40G内存+新建虚拟硬盘动态分配64G | GlusterFS |
前置环境:k8s集群ok ,helm环境ok,安装helm服务端和客户端
目标环境:Gluster环境ok,kubesphere3.0环境ok
# yum 安装Gluster yum install -y centos-release-gluster yum install -y glusterfs glusterfs-server glusterfs-fuse glusterfs-rdma
加载内核
echo dm_thin_pool | sudo tee -a /etc/modules echo dm_snapshot | sudo tee -a /etc/modules echo dm_mirror | sudo tee -a /etc/modules
#启动Gluster systemctl start glusterd && systemctl enable glusterd && systemctl status glusterd
主节点执行,发现节点
gluster peer probe 10.0.2.15 gluster peer probe 10.0.2.5 gluster peer probe 10.0.2.4gluster peer status
heketi配置
- 主节点执行
yum install heketi heketi-client -y
设置连接
ssh-keygen -f /etc/heketi/heketi_key -t rsa -N '' chown heketi:heketi /etc/heketi/heketi* ssh-copy-id -i /etc/heketi/heketi_key.pub root@10.0.2.4 ssh-copy-id -i /etc/heketi/heketi_key.pub root@10.0.2.15 ssh-copy-id -i /etc/heketi/heketi_key.pub root@10.0.2.5
验证
ssh -i /etc/heketi/heketi_key root@10.0.2.5
如果添加的volume小的话可能会提示No Space,要解决这一问题要在heketi.json添加"brick_min_size_gb" : 1 ,1为1G
cat <<EOF> /etc/heketi/heketi.json {"port": "18080","use_auth": false,"jwt": {"admin": {"key": "adminSecret"},"user": {"key": "userSecret"}},"glusterfs": {"executor": "ssh","sshexec": {"keyfile": "/etc/heketi/heketi_key","user": "root","port": "22","fstab": "/etc/fstab"},"brick_min_size_gb" : 1,"db": "/var/lib/heketi/heketi.db","loglevel" : "debug"} } EOF
systemctl start heketi && systemctl enable heketi && systemctl status heketi
使用拓扑创建存储空间
cat <<EOF> /etc/heketi/topolgy_demo.json {"clusters": [{"nodes": [{"node": {"hostnames": {"manage": ["10.0.2.4"],"storage": ["10.0.2.4"]},"zone": 1},"devices": ["/dev/sdb"]},{ "node": {"hostnames": {"manage": ["10.0.2.15"],"storage": ["10.0.2.15"]},"zone": 1},"devices": ["/dev/sdb"]},{ "node": {"hostnames": {"manage": ["10.0.2.5"],"storage": ["10.0.2.5"]},"zone": 1},"devices": ["/dev/sdb"]} ]}] } EOF
export HEKETI_CLI_SERVER=http://10.0.2.4:18080 echo $HEKETI_CLI_SERVER heketi-cli topology load --json=/etc/heketi/topolgy_demo.json
#创建一个StorageClass cat <<EOF> gluster-storage-class.yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata:name: glusterfs #-------------存储类的名字 provisioner: kubernetes.io/glusterfs parameters:resturl: "http://10.0.2.4:18080" #-------------heketi 的ip 和端口restuser: "admin" #-------------heketi的认证用户,这里随便填,因为没有启用鉴权模式 gidMin: "40000"gidMax: "50000"restauthenabled: "true"volumetype: "replicate:3" #-------------申请的默认为3副本模式,因为目前有三个gluster节点。 EOF
kubectl apply -f gluster-storage-class.yaml
设置默认存储
kubectl patch storageclass glusterfs -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
kubectl get sc
安装kubesphere3.0(最小化安装)
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/kubesphere-installer.yamlkubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.0.0/cluster-configuration.yaml
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
下一步启动devops和告警通知组件
参考文档:https://www.cnblogs.com/breezey/p/8849466.html,https://www.cnblogs.com/fan-gx/p/12101686.html
注意事项
- master节点是主节点,是调度的,不需要太高的内存和处理器
- node2和node3调整到11g,cpu6核
- devops:开启,jekinsmemoryReq大小为1000M,sonar开启
- notification:开启
- alert: 开启
- 在启用这三个插件时,ks-minio这个服务会一直创建2个工作负载(这是有问题的,配置文件里面只有1的副本),这个问题会导致无限重启,需要手动删除即可
kubectl -n kubesphere-system delete job minio-make-bucket-job
kubectl get pod minio-make-bucket-job-jvsrn -n kubesphere-system -o yaml | kubectl replace --force -f -
这个问题最后实在没法解决重启虚拟机就好了,真是奇怪
Gluster安装+kubesphere3.0相关推荐
- kubesphere3.0的安装完整文档
kubesphere3.0的安装文档 https://www.yuque.com/leifengyang/kubesphere/hxzk3t#SAP5W 基于kubernetes环境安装kubesph ...
- centos 下安装mysql,linux(Centos7)下安装mysql8.0.18的教程图解
1 获取安装资源包 mysql-8.0.18-1.el7.x86_64.rpm-bundle.tar 提取码: rsif 2 在/usr/local目录下新建目录mysql8 3 将下载的资源包(my ...
- mysql 8.0 docker_Docker安装MySQL8.0的实现方法
环境:MacOS_Cetalina_10.15.1.Mysql8.0.18.Docker_2.0.0.3 1.docker仓库搜索mysql docker search mysql 2.docker仓 ...
- Ubuntu14.04 64位机上安装cuda8.0+cudnn5.0操作步骤
查看Ubuntu14.04 64位上显卡信息,执行: lspci | grep -i vga lspci -v -s 01:00.0 nvidia-smi 第一条此命令可以显示一些显卡的相关信息:如果 ...
- 【Linux】在VirtualBox-6.0中安装Manjaro18.0
1.参考博客: VMware虚拟机下Manjaro17.1.6安装详细教程 2.在VirtualBox-6.0中安装Manjaro18.0 1)基本步骤和博客中安装17.1.6相同,下面只记录不同的. ...
- 宝塔面板 mysql装不上_宝塔面板强制安装mysql8.0
释放双眼,带上耳机,听听看~! mysql终于更新到8.0,mysql8.0对比以往的版本有了很大的提升,但是要求的服务器配置也就变得越来越高.对于低配置服务器,在宝塔面板进行安装时,总会出现&quo ...
- TensorFlow2.0正式版发布,极简安装TF2.0(CPUGPU)教程
作者 | 小宋是呢 转载自CSDN博客 [导读]TensorFlow 2.0,昨天凌晨,正式放出了2.0版本. 不少网友表示,TensorFlow 2.0比PyTorch更好用,已经准备全面转向这个新 ...
- Centos 7.5 安装Zabbix4.0
Centos 7.5 安装Zabbix4.0 一.参考链接 zabbix官方安装文档:https://www.zabbix.com/cn/download zabbix官方产品文档:https://w ...
- 创建虚拟环境 安装pytorch 0.3.1
(1)创建虚拟环境 https://blog.csdn.net/lyy14011305/article/details/59500819 (2)安装pytorch=0.3.1 conda instal ...
最新文章
- MySQL 5.7.10 免安装配置
- list foreach方法_Java集合三兄弟List,Set,Map你分的清楚吗?
- C++|Qt工作笔记-对explicit的认识(Qt中一般情况下为什么会自动加上这个关键字)
- 渗透测试入门2之进入内网
- before和after怎么区分_触发器before和after的区别
- 想搞一套AI问答游戏系统?简单,Google又开源了
- ABP架构学习系列二:ABP中配置的注册和初始化
- python基本判断语句_python两种简洁的条件判断语句写法
- ps3 安装linux,PlayStation 3上安装Ubuntu Linux[图文]
- 双缓冲-- double framebuffer
- 小用lambda表达式,查询数组里大于80的个数
- A88xm-plus 主板采用Clover实现 m2 固态硬盘启动
- 浙大玉泉校区路由器L2TP设置(极路由1s)
- linux调整列显示宽度,使单元格或列自动调整宽度 - 在SWT中使用OLE操纵Excel_Linux编程_Linux公社-Linux系统门户网站...
- steam账号连接服务器遇到问题,无法预料的服务器浏览器反应 - Steam Support
- Hooks详解(一)
- HTML学习笔记及案例(第四周 第1次)
- 「企企通」完成Pre-D轮融资,加速采购供应链工业软件和 SaaS 网络生态构建
- notify()和 notifyAll()有什么区别
- Python安装Github包,离线包和在线包