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

KubeSphere 中间件部署

作者头像
OY
发布2023-02-23 20:18:49
发布2023-02-23 20:18:49
72800
代码可运行
举报
文章被收录于专栏:OY_学习记录OY_学习记录
运行总次数:0
代码可运行

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

一、MySQL

1、创建配置

代码语言:javascript
代码运行次数:0
运行
复制
[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 文件系统,需要提前安装一下,安装方法请参考附加内容

后面点击创建即可。

3、创建有状态应用

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

4、配置负载均衡网络

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

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

创建

最后点击创建即可。

  • 外网访问

创建

测试

二、Redis

1、创建配置

代码语言:javascript
代码运行次数:0
运行
复制
appendonly yes
port 6379
bind 0.0.0.0

点击创建即可

2、创建有状态应用

应用负载 ==》 工作负载

代码语言:javascript
代码运行次数:0
运行
复制
运行命名 redis-server
参数 /etc/redis/redis.conf

最后点击创建即可。

3、配置负载均衡网络

应用负载 ==》 服务

三、ElasticSearch

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

1、创建配置文件

代码语言:javascript
代码运行次数:0
运行
复制
cluster.name: "docker-cluster"
network.host: 0.0.0.0
代码语言:javascript
代码运行次数:0
运行
复制
################################################################
##
## 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

2、创建有状态应用

应用负载 ==》 工作负载

代码语言:javascript
代码运行次数:0
运行
复制
elasticsearch:7.13.4

这个地方需要注意:

点击创建即可。

3、配置负载均衡网络

应用负载 ==》 服务

四、Nacos

1、创建配置

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

cluster.conf

代码语言:javascript
代码运行次数:0
运行
复制
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、创建有状态应用

代码语言:javascript
代码运行次数:0
运行
复制
nacos/nacos-server:v2.0.3

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

3、配置负载均衡网络

五、Sentinel

1、创建有状态应用

代码语言:javascript
代码运行次数:0
运行
复制
leifengyang/sentinel:1.8.2

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

2、配置负载均衡网络

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表: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、配置负载均衡网络
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档