3.安装kubesphere

news/2024/11/28 10:42:52/

1.本地存储动态 PVC

# 在所有节点安装 iSCSI 协议客户端(OpenEBS 需要该协议提供存储支持)
yum install iscsi-initiator-utils -y
# 设置开机启动
systemctl enable --now iscsid
# 启动服务
systemctl start iscsid
# 查看服务状态
systemctl status iscsid# 安装 OpenEBS 
kubectl apply -f https://openebs.github.io/charts/openebs-operator.yaml# 查看状态(下载镜像可能需要一些时间)
kubectl get all -n openebs# 在主节点创建本地 storage class
kubectl apply -f default-storage-class.yaml

2.安装

# 安装资源
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/kubesphere-installer.yaml
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/cluster-configuration.yaml# 检查安装日志
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f# 查看端口
kubectl get svc/ks-console -n kubesphere-system# 默认端口是 30880,如果是云服务商,或开启了防火墙,记得要开放该端口# 登录控制台访问,账号密码:admin/P@88w0rd

3.示例

[root@k8s-master kubesphere]# ll
total 76
-rw-r--r-- 1 root root 10070 Jul 26 07:14 cluster-configuration.yaml
-rw-r--r-- 1 root root  1049 Jul 26 07:14 default-storage-class.yaml
-rw-r--r-- 1 root root  7631 Jul 26 07:14 kubesphere-delete.sh
-rw-r--r-- 1 root root   386 Jul 26 07:14 kubesphere-ingress.yaml
-rw-r--r-- 1 root root  4553 Jul 26 07:14 kubesphere-installer.yaml
-rw-r--r-- 1 root root 38283 Jul 26 07:14 openebs-operator.yaml
[root@k8s-master kubesphere]# kubectl apply -f openebs-operator.yaml 
namespace/openebs created
serviceaccount/openebs-maya-operator created
clusterrole.rbac.authorization.k8s.io/openebs-maya-operator created
clusterrolebinding.rbac.authorization.k8s.io/openebs-maya-operator created
customresourcedefinition.apiextensions.k8s.io/blockdevices.openebs.io created
customresourcedefinition.apiextensions.k8s.io/blockdeviceclaims.openebs.io created
configmap/openebs-ndm-config created
daemonset.apps/openebs-ndm created
deployment.apps/openebs-ndm-operator created
deployment.apps/openebs-ndm-cluster-exporter created
service/openebs-ndm-cluster-exporter-service created
daemonset.apps/openebs-ndm-node-exporter created
service/openebs-ndm-node-exporter-service created
deployment.apps/openebs-localpv-provisioner created
storageclass.storage.k8s.io/openebs-hostpath created
storageclass.storage.k8s.io/openebs-device created[root@k8s-master kubesphere]# kubectl apply -f default-storage-class.yaml 
storageclass.storage.k8s.io/local created[root@k8s-master kubesphere]# kubectl get sc
NAME               PROVISIONER        RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local (default)    openebs.io/local   Delete          WaitForFirstConsumer   false                  17m
openebs-device     openebs.io/local   Delete          WaitForFirstConsumer   false                  19m
openebs-hostpath   openebs.io/local   Delete          WaitForFirstConsumer   false                  19m[root@k8s-master kubesphere]# kubectl apply -f kubesphere-installer.yaml 
customresourcedefinition.apiextensions.k8s.io/clusterconfigurations.installer.kubesphere.io created
namespace/kubesphere-system created
serviceaccount/ks-installer created
clusterrole.rbac.authorization.k8s.io/ks-installer created
clusterrolebinding.rbac.authorization.k8s.io/ks-installer created
deployment.apps/ks-installer created[root@k8s-master kubesphere]# kubectl get po -n kubesphere-system
NAME                            READY   STATUS    RESTARTS   AGE
ks-installer-7489cf4b66-wj4rc   1/1     Running   0          16m
openldap-0                      0/1     Pending   0          3s[root@k8s-master kubesphere]# kubectl apply -f cluster-configuration.yaml 
clusterconfiguration.installer.kubesphere.io/ks-installer created

 查看日志:

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f

 

 

yml附件:

 


http://www.ppmy.cn/news/981081.html

相关文章

VU3-02

1.一些小点 1.1 npm i -D less (安装less) -D 安装依赖到开发环境中 只在开发中生效 正式打包的时候没有它,只在开发时有效 1.2 父子组件传参 (1)子组件中定义自己的参数和事件 父传子:const props defineProps(["item&quo…

Java三大特性,设计的五大原则的理解

Java三大特性分别是封装,继承,多态。 下面谈谈我对这三个特性的理解: 1.封装 指的是将类的成员变量(属性)和成员方法(方法)隐藏起来,通过使用访问修饰符(如private、public、protected等)来限制外部对类的直接访问,从而…

华为OD机试真题 Java 实现【数据分类】【2023 B卷 100分】,附详细解题思路

目录 专栏导读一、题目描述二、输入描述三、输出描述四、解题思路1、输入2、输出3、解题思路 五、Java算法源码六、效果展示1、输入2、输出 华为OD机试 2023B卷题库疯狂收录中,刷题点这里 专栏导读 本专栏收录于《华为OD机试(JAVA)真题&…

nginx吞吐量调优

调整worker_processes和worker_connections: worker_processes:设置为服务器的CPU核心数或更高。例如,如果服务器有8个CPU核心,可以将worker_processes设置为8。worker_connections:设置每个worker进程所能处理的最大连…

腾讯校园招聘技术类编程题汇总

题解&#xff1a;并查集&#xff08;模板&#xff09; #include <iostream> #include<map> using namespace std; int father[2000006]; int rank1[1000005]; void init(int n){for(int i1;i<1e5;i){father[i]i;rank1[i]1;} } int find(int x){if(father[x]x){…

064、故障处理之OMM_TiDB

oom 内存溢出&#xff0c;内存泄漏&#xff0c;相当于TiDB不能用了 TiDB Server OOM对业务的影响 TiDB Server上的业务SQL会失败业务响应时间升高前端体验变差 诊断方法 客户端应用 ERROR 2013(HY000): Lost connection to MySQL Server during query日志 dmesg -T | gr…

Docker Compose容器的快速编排

Docker Compose容器的快速编排 一、Docker Compose简介1、Docker Compose是什么2、Docker Compose三大概念 二、Docker Compose 安装与操作1、环境安装2、YAML文件格式及编写注意事项3、Docker Compose配置常用字段4、Docker Compose常用命令5、Docker Compose文件结构6、删除创…

c# Outlook检索设定问题

基于c# 设定outlook约会予定&#xff0c;时间格式是YYYY-MM-DD HH:mm 的情报。 问题发生&#xff1a; 根据开始时间&#xff08;2023/01/01 7:00&#xff09;条件查询该时间是否存在outlook信息时&#xff0c;明明存在一条数据&#xff0c;就是查询不出来数据 c#代码 Strin…