首页 > 其他分享 >kubenetes1.26中安装kubesphere3.4版本

kubenetes1.26中安装kubesphere3.4版本

时间:2024-04-17 20:24:07浏览次数:22  
标签:monitoring kubenetes1.26 kubesphere system Running master 版本 kube kubesphere3.4

一、安装前环境准备

# kubesphere官网:https://kubesphere.io/zh/docs/v3.4/introduction/what-is-kubesphere/

# 1.kubenetes版本查看
[root@master kubesphere]# kubectl get nodes
NAME     STATUS   ROLES           AGE    VERSION
master   Ready    control-plane   106m   v1.26.0
node1    Ready    work            103m   v1.26.0

# 2.kubesphere安装前环境准备
# https://kubesphere.io/zh/docs/v3.4/installing-on-kubernetes/introduction/prerequisites/

Centos 7.9
cpu内存:4核8G
硬盘:50G

依赖项:yum install -y socat、conntrack、ebtables、ipset

# 2.集群中创建默认StorageClass
# 默认没有,可以自建
创建 StorageClass
设置默认 StorageClass

# 创建storageclass最后
[root@master kubesphere]# cat sc.yaml 
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer

# 设置为默认StorageClass
ubectl patch storageclass local-storage -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

# 执行查看
[root@master kubesphere]# kubectl get sc
NAME                      PROVISIONER                    RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-storage (default)   kubernetes.io/no-provisioner   Delete          WaitForFirstConsumer   false                  54m

PS:上面创建的storageclass 确实可以成功安装kubesphere,但是local-storage配合pvc无法动态创建pv。因此,创建storageclass 也可以使用nfs-storageclass



二、安装kubesphere

# 1.如果配置要求达到8核16G,可以把插件都启用安装上,没有的话就最小化安装
# 执行命令安装
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.1/kubesphere-installer.yaml

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.1/cluster-configuration.yaml

# 2.检查安装日志,上面命令执行完成后,等待10分钟左右可以看到
Start installing monitoring
Start installing multicluster
Start installing openpitrix
Start installing network
**************************************************
Waiting for all tasks to be completed ...
task network status is successful  (1/4)
task openpitrix status is successful  (2/4)
task multicluster status is successful  (3/4)


task monitoring status is successful  (4/4)
**************************************************
Collecting installation results ...

#####################################################
###              Welcome to KubeSphere!           ###
#####################################################

Console: http://192.168.10.20:30880
Account: admin
Password: P@88w0rd
NOTES:
  1. After you log into the console, please check the
     monitoring status of service components in
     "Cluster Management". If any service is not
     ready, please wait patiently until all components 
     are up and running.
  2. Please change the default password after login.

#####################################################
https://kubesphere.io             2024-04-17 18:06:26
#####################################################

# 3.使用 kubectl get pod --all-namespaces 查看所有 Pod 在 KubeSphere 相关的命名空间是否正常运行。如果是正常运行,请通过以下命令来检查控制台的端口(默认为 30880):
[root@master kubesphere]# kubectl get pod --all-namespaces
NAMESPACE                      NAME                                              READY   STATUS    RESTARTS       AGE
kube-system                    calico-kube-controllers-6d6dc86d84-dfdsv          1/1     Running   0              127m
kube-system                    calico-node-r6zrj                                 1/1     Running   0              127m
kube-system                    calico-node-xh8dv                                 1/1     Running   1 (125m ago)   127m
kube-system                    calico-typha-57cbf5b54d-4zc9r                     1/1     Running   0              127m
kube-system                    coredns-567c556887-j9jfb                          1/1     Running   0              133m
kube-system                    coredns-567c556887-mv57p                          1/1     Running   0              133m
kube-system                    etcd-master                                       1/1     Running   0              133m
kube-system                    kube-apiserver-master                             1/1     Running   0              133m
kube-system                    kube-controller-manager-master                    1/1     Running   0              133m
kube-system                    kube-proxy-4lrj6                                  1/1     Running   0              133m
kube-system                    kube-proxy-pdwzp                                  1/1     Running   0              130m
kube-system                    kube-scheduler-master                             1/1     Running   0              133m
kube-system                    snapshot-controller-0                             1/1     Running   0              42m
kubesphere-controls-system     default-http-backend-864f4f5c6b-s6s92             1/1     Running   1 (40m ago)    41m
kubesphere-controls-system     kubectl-admin-c6988866d-ghstw                     1/1     Running   0              34m
kubesphere-monitoring-system   alertmanager-main-0                               2/2     Running   0              38m
kubesphere-monitoring-system   kube-state-metrics-5f77fc8f6d-7pvbz               3/3     Running   0              38m
kubesphere-monitoring-system   node-exporter-7nwsc                               2/2     Running   0              38m
kubesphere-monitoring-system   node-exporter-kf5cj                               2/2     Running   0              38m
kubesphere-monitoring-system   notification-manager-deployment-f86fdf45d-m5gj9   2/2     Running   0              37m
kubesphere-monitoring-system   notification-manager-operator-7b8dcfd75c-bpm6c    2/2     Running   0              37m
kubesphere-monitoring-system   prometheus-k8s-0                                  0/2     Pending   0              38m
kubesphere-monitoring-system   prometheus-operator-845b8fb9df-nxhpd              2/2     Running   0              38m
kubesphere-system              ks-apiserver-756b474857-47jjd                     1/1     Running   0              41m
kubesphere-system              ks-console-876f69ff4-47rgn                        1/1     Running   0              41m
kubesphere-system              ks-controller-manager-64d7d5dc77-95ln2            1/1     Running   0              41m
kubesphere-system              ks-installer-7fc5675448-8wphm                     1/1     Running   0              43m

[root@master kubesphere]# kubectl get svc/ks-console -n kubesphere-system
NAME         TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
ks-console   NodePort   10.96.165.196   <none>        80:30880/TCP   43m

4.确保在安全组中打开了 30880 端口,通过 NodePort (IP:30880) 使用默认帐户和密码 (admin/P@88w0rd) 访问 Web 控制台
http://192.168.10.20:30880/login

三、启动插件 

# 插件占用资源
https://kubesphere.io/zh/docs/v3.4/pluggable-components/overview/

# 启动日志插件
[root@master kubesphere]# vim cluster-configuration.yaml 
logging:
  enabled: true   # false改true

[root@master kubesphere]# kubectl apply -f cluster-configuration.yaml 
clusterconfiguration.installer.kubesphere.io/ks-installer configured

[root@master kubesphere]# kubectl get pods --all-namespaces | grep log
kubesphere-logging-system      fluent-bit-77s4z                                  0/1     ContainerCreating   0              31s
kubesphere-logging-system      fluent-bit-b5zlk                                  0/1     ContainerCreating   0              31s
kubesphere-logging-system      fluentbit-operator-67898f4dd8-lxnd5               1/1     Running             0              2m14s
kubesphere-logging-system      opensearch-cluster-data-0                         0/1     Pending             0              2m31s
kubesphere-logging-system      opensearch-cluster-data-1                         0/1     Pending             0              2m30s
kubesphere-logging-system      opensearch-cluster-master-0                       0/1     Pending             0              2m32s

 

标签:monitoring,kubenetes1.26,kubesphere,system,Running,master,版本,kube,kubesphere3.4
From: https://www.cnblogs.com/yangmeichong/p/18141519

相关文章

  • 夜莺监控 V7 第二个 beta 版本发布,内置集成故障自愈能力,简化部署
    经过一个半月的打磨改进,夜莺监控V7第二个beta版本发布了,本次发布的主要亮点是内置集成故障自愈能力,简化架构,同时做了其他19项改进。一些重要的改进如下:feat:集成故障自愈的能力,不需要再单独部署ibex模块了refactor:内置仪表盘和内置规则页面重构refactor:业务组树......
  • tomcat启动指定java版本
    linux上已经配置jdk1.8为全局变量,但是tomcat运行需要指定jdk11。那么我们在不影响全局JAVA_HOME变量的时候,需直接指定JAVA_HOME即可。[rootapache-tomcat-8.5.87]#java-versionjavaversion"1.8.0_211"Java(TM)SERuntimeEnvironment(build1.8.0_211-b12)JavaHotSpo......
  • Windows 11 LTSC版本的优缺点
    随着Windows11的发布,微软推出了多个版本,其中包括Windows11LTSC版。LTSC(长期服务分支)版本通常被视为适合特定企业环境或者对稳定性和长期支持有需求的用户。然而,对于普通用户来说,Windows11LTSC版可能并非最佳选择。首先,Windows11LTSC版被标榜为适用于老电脑,这意味着它可以......
  • bat中检查系统版本并添加系统变量
    bat中检查系统版本并添加系统变量补丁包中升级nodejs​版本时,需要检查下操作系统版本,如果低于Windows8.1​需要添加系统变量NODE_SKIP_PLATFORM_CHECK​@echoofffor/f"tokens=1,2,3,4"%%iin('ver')do(setver_temp=%%l)setver_major=%ver_temp:~0,2%se......
  • bat中检查系统版本并添加系统变量
    bat中检查系统版本并添加系统变量补丁包中升级nodejs​版本时,需要检查下操作系统版本,如果低于Windows8.1​需要添加系统变量NODE_SKIP_PLATFORM_CHECK​@echoofffor/f"tokens=1,2,3,4"%%iin('ver')do(setver_temp=%%l)setver_major=%ver_temp:~0,2%se......
  • mysql主从升级(直接先升级主库,旧binlog拷贝到新版本目录,需要停业务)
    环境:OS:Centos7旧版本:mysql5.6新版本:mysql5.71.停掉旧版本数据库确保主从当前没有延迟再停主库,不过有延迟也可以停掉查看从库的状态mysql>showslavestatus\G;***************************1.row***************************Slave_IO_State:Wai......
  • mysql小版本升级(yg)
    mysql小版本升级两种方式:In-PlaceUpgradeLogicalUpgrade[In-PlaceUpgrade](#in-placeupgrade)​ 原地升级(In-PlaceUpgrade:直接替换二进制文件(即直接yumupdate/rpm-Uvh升级rpm包)数据库目录等都不变。LogicalUpgrade​ 逻辑升级(LogicalUpgrade):先用mysqldump......
  • mysql小版本升级
    #rpm-ivhmysql-community-common-8.0.23-1.el8.x86_64.rpm#rpm-ivhmysql-community-client-plugins-8.0.23-1.el8.x86_64.rpm#rpm-ivhmysql-community-libs-8.0.23-1.el8.x86_64.rpm#rpm-ivhmysql-community-client-8.0.23-1.el8.x86_64.rpm#rpm-ivhmy......
  • yum安装指定版本mysql
    参考链接:https://blog.csdn.net/Sunny_Future/article/details/105345493参考链接:https://dev.mysql.com/doc/refman/8.0/en/linux-installation-yum-repo.html安装好依赖环境yuminstall-yyum-utilswget下载仓库包wgethttps://dev.mysql.com/get/mysql80-community-rel......
  • 小版本升级(pxc)
    配置yum仓库,可以通过yum下载pxcyuminstall-yhttps://repo.percona.com/yum/percona-release-latest.noarch.rpm关闭数据库systemctlstopmysql升级:sudoyumupdatePercona-XtraDB-Cluster-57以单节点模式启动服务sudomysqld--skip-grant-tables--user=mysql--w......