前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >KubeSphere 中间件部署

KubeSphere 中间件部署

作者头像
OY
发布2023-02-23 20:18:49
5870
发布2023-02-23 20:18:49
举报
文章被收录于专栏:OY_学习记录OY_学习记录

应用部署需要关注的信息【应用部署三要素】 1、应用的部署方式 2、应用的数据挂载(数据,配置文件) 3、应用的可访问性

image-20230129155209779
image-20230129155209779

一、MySQL

1、创建配置

image-20230129155402637
image-20230129155402637
image-20230129155504840
image-20230129155504840
image-20230129155604640
image-20230129155604640
代码语言:javascript
复制
[client]
default-character-set=utf8mb4

[mysql]
default-character-set=utf8mb4

[mysqld]
init_connect='SET collation_connection = utf8mb4_unicode_ci'
init_connect='SET NAMES utf8mb4'
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
skip-character-set-client-handshake
skip-name-resolve

2、创建存储卷

注意:如果没有安装 nfs 文件系统,需要提前安装一下,安装方法请参考附加内容

image-20230129155802439
image-20230129155802439
image-20230129161731413
image-20230129161731413

后面点击创建即可。

3、创建有状态应用

image-20230129165642095
image-20230129165642095
image-20230129162107529
image-20230129162107529
image-20230129162220310
image-20230129162220310
image-20230129162257903
image-20230129162257903
image-20230129162442920
image-20230129162442920
image-20230129162600190
image-20230129162600190
image-20230129162738141
image-20230129162738141
image-20230129162803248
image-20230129162803248
image-20230129162900703
image-20230129162900703

之后点击下一步 ==》 创建

4、配置负载均衡网络

  • 自定义集群内服务名访问

在服务里面,删除原先的有状态副本集

image-20230129172456606
image-20230129172456606

创建

image-20230129172541006
image-20230129172541006
image-20230129172626509
image-20230129172626509
image-20230129172720706
image-20230129172720706
image-20230129172802517
image-20230129172802517
image-20230129172851437
image-20230129172851437

最后点击创建即可。

  • 外网访问

创建

image-20230129173254502
image-20230129173254502
image-20230129173447548
image-20230129173447548
image-20230129173502149
image-20230129173502149
image-20230129173529796
image-20230129173529796
image-20230129173603453
image-20230129173603453
image-20230129173640085
image-20230129173640085
image-20230129173841755
image-20230129173841755

测试

image-20230129173830803
image-20230129173830803

二、Redis

1、创建配置

image-20230129232039958
image-20230129232039958
image-20230129232137801
image-20230129232137801
代码语言:javascript
复制
appendonly yes
port 6379
bind 0.0.0.0

点击创建即可

2、创建有状态应用

应用负载 ==》 工作负载

image-20230129232357869
image-20230129232357869
image-20230129232443868
image-20230129232443868
image-20230129232514611
image-20230129232514611
image-20230129232611066
image-20230129232611066
代码语言:javascript
复制
运行命名 redis-server
参数 /etc/redis/redis.conf
image-20230129232740906
image-20230129232740906
image-20230129232848300
image-20230129232848300
image-20230129232914015
image-20230129232914015
image-20230129233024587
image-20230129233024587

最后点击创建即可。

3、配置负载均衡网络

应用负载 ==》 服务

image-20230130002159940
image-20230130002159940
image-20230130002639249
image-20230130002639249
image-20230130002724916
image-20230130002724916
image-20230130002753523
image-20230130002753523

三、ElasticSearch

在任意节点上创建目录: mkdir -p /mydata/es-01 && chmod 777 -R /mydata/es-01

1、创建配置文件

image-20230130141142115
image-20230130141142115
image-20230130141503420
image-20230130141503420
代码语言:javascript
复制
cluster.name: "docker-cluster"
network.host: 0.0.0.0
image-20230130142631820
image-20230130142631820
代码语言:javascript
复制
################################################################
##
## JVM configuration
##
################################################################
##
## WARNING: DO NOT EDIT THIS FILE. If you want to override the
## JVM options in this file, or set any additional options, you
## should create one or more files in the jvm.options.d
## directory containing your adjustments.
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/jvm-options.html
## for more information.
##
################################################################



################################################################
## IMPORTANT: JVM heap size
################################################################
##
## The heap size is automatically configured by Elasticsearch
## based on the available memory in your system and the roles
## each node is configured to fulfill. If specifying heap is
## required, it should be done through a file in jvm.options.d,
## and the min and max should be set to the same value. For
## example, to set the heap to 4 GB, create a new file in the
## jvm.options.d directory containing these lines:
##
## -Xms4g
## -Xmx4g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################


################################################################
## Expert settings
################################################################
##
## All settings below here are considered expert settings. Do
## not adjust them unless you understand what you are doing. Do
## not edit them in this file; instead, create a new file in the
## jvm.options.d directory containing your adjustments.
##
################################################################

## GC configuration
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly

## G1GC Configuration
# NOTE: G1 GC is only supported on JDK version 10 or later
# to use G1GC, uncomment the next two lines and update the version on the
# following three lines to your version of the JDK
# 10-13:-XX:-UseConcMarkSweepGC
# 10-13:-XX:-UseCMSInitiatingOccupancyOnly
14-:-XX:+UseG1GC

## JVM temporary directory
-Djava.io.tmpdir=${ES_TMPDIR}

## heap dumps

# generate a heap dump when an allocation from the Java heap fails; heap dumps
# are created in the working directory of the JVM unless an alternative path is
# specified
-XX:+HeapDumpOnOutOfMemoryError

# specify an alternative path for heap dumps; ensure the directory exists and
# has sufficient space
-XX:HeapDumpPath=data

# specify an alternative path for JVM fatal error logs
-XX:ErrorFile=logs/hs_err_pid%p.log

## JDK 8 GC logging
8:-XX:+PrintGCDetails
8:-XX:+PrintGCDateStamps
8:-XX:+PrintTenuringDistribution
8:-XX:+PrintGCApplicationStoppedTime
8:-Xloggc:logs/gc.log
8:-XX:+UseGCLogFileRotation
8:-XX:NumberOfGCLogFiles=32
8:-XX:GCLogFileSize=64m

# JDK 9+ GC logging
9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
image-20230130142709614
image-20230130142709614

2、创建有状态应用

应用负载 ==》 工作负载

image-20230130142930059
image-20230130142930059
image-20230130143010725
image-20230130143010725
代码语言:javascript
复制
elasticsearch:7.13.4
image-20230130143051413
image-20230130143051413
image-20230130143221668
image-20230130143221668
image-20230130143300452
image-20230130143300452
image-20230130143401533
image-20230130143401533
image-20230130143420223
image-20230130143420223

这个地方需要注意:

image-20230130143725462
image-20230130143725462
image-20230130143914422
image-20230130143914422

点击创建即可。

3、配置负载均衡网络

应用负载 ==》 服务

image-20230130154138033
image-20230130154138033
image-20230130154211040
image-20230130154211040
image-20230130154238921
image-20230130154238921
image-20230130154352913
image-20230130154352913
image-20230130154411265
image-20230130154411265

四、Nacos

1、创建配置

image-20230201140415010
image-20230201140415010
image-20230201140756786
image-20230201140756786

图片中的两个配置项请参考 nacos-2.0.3 版本,目录下 conf

image-20230201140848292
image-20230201140848292

cluster.conf

代码语言:javascript
复制
ruoyi-nacos-v1-0.ruoyi-nacos.ruoyi.svc.cluster.local:8848
ruoyi-nacos-v1-1.ruoyi-nacos.ruoyi.svc.cluster.local:8848
ruoyi-nacos-v1-2.ruoyi-nacos.ruoyi.svc.cluster.local:8848

2、创建有状态应用

image-20230201141119776
image-20230201141119776
image-20230201141134249
image-20230201141134249
image-20230201141211264
image-20230201141211264
image-20230201141229521
image-20230201141229521
代码语言:javascript
复制
nacos/nacos-server:v2.0.3
image-20230201141332088
image-20230201141332088
image-20230201141416511
image-20230201141416511

这里需要配置一个健康检查:

image-20230201232157515
image-20230201232157515
image-20230201232220508
image-20230201232220508
image-20230202134530703
image-20230202134530703
image-20230201141431684
image-20230201141431684
image-20230201141455898
image-20230201141455898
image-20230201143453676
image-20230201143453676
image-20230201143559597
image-20230201143559597

3、配置负载均衡网络

image-20230201143813427
image-20230201143813427
image-20230201143913036
image-20230201143913036
image-20230201143938739
image-20230201143938739

五、Sentinel

1、创建有状态应用

image-20230202143120511
image-20230202143120511
代码语言:javascript
复制
leifengyang/sentinel:1.8.2
image-20230202143053216
image-20230202143053216
image-20230202143214493
image-20230202143214493

后面下一步点击创建即可。

2、配置负载均衡网络

image-20230202143959179
image-20230202143959179
image-20230202144021841
image-20230202144021841
image-20230202144034025
image-20230202144034025
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2023-02-11,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 一、MySQL
    • 1、创建配置
      • 2、创建存储卷
        • 3、创建有状态应用
          • 4、配置负载均衡网络
          • 二、Redis
            • 1、创建配置
              • 2、创建有状态应用
                • 3、配置负载均衡网络
                • 三、ElasticSearch
                  • 1、创建配置文件
                    • 2、创建有状态应用
                      • 3、配置负载均衡网络
                      • 四、Nacos
                        • 1、创建配置
                          • 2、创建有状态应用
                            • 3、配置负载均衡网络
                            • 五、Sentinel
                              • 1、创建有状态应用
                                • 2、配置负载均衡网络
                                相关产品与服务
                                负载均衡
                                负载均衡(Cloud Load Balancer,CLB)提供安全快捷的流量分发服务,访问流量经由 CLB 可以自动分配到云中的多台后端服务器上,扩展系统的服务能力并消除单点故障。负载均衡支持亿级连接和千万级并发,可轻松应对大流量访问,满足业务需求。
                                领券
                                问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档