KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4)

这篇具有很好参考价值的文章主要介绍了KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

**《KubeSphere 核心实战系列》**

KubeSphere 核心实战之一(实操篇 1/4)

KubeSphere 核心实战之二(实操篇 2/4)

KubeSphere 核心实战之三(实操篇 3/4)

KubeSphere 核心实战之三(实操篇 4/4)更新中…

**《KubeSphere 核心实战系列》**

1、部署ElasticSearch

Elasticsearch 是一个分布式的 RESTful 风格的搜索和数据分析引擎。用来做数据分析和检索的中间件。
它在kubesphere平台上的部署跟mysql和redis又有不同;下面我们来具体分析操作一下:

1.1、es容器启动

# 创建数据目录
mkdir -p /mydata/es-01 && chmod 777 -R /mydata/es-01

# 容器启动
docker run --restart=always -d -p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms512m -Xmx512m" \
-v es-config:/usr/share/elasticsearch/config \
-v /mydata/es-01/data:/usr/share/elasticsearch/data \
--name es-01 \
elasticsearch:7.13.4

-e 为环境变量
-v 为数据卷挂载;一个是es产生的数据,另一个是es的配置。
–name:容器名称

1.2、es部署分析

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

注意: 子路径挂载,配置修改后,k8s不会对其Pod内的相关配置文件进行热更新,需要自己重启Pod

1.3、ElasticSearch的配置集

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
第一个文件挂载:elasticsearch.yml
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
第二个文件挂载:jvm.options
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

相当于一个es配置项中配置了两个配置文件:
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

## 文件名 elasticsearch.yml

cluster.name: "docker-cluster"
network.host: 0.0.0.0
## 文件名 jvm.options

################################################################
##
## 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

1.4、创建es工作负载

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
选择es镜像:elasticsearch:7.13.4

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
使用默认端口
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
添加两个环境变量:

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
数据挂载:
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

第二个文件挂载:
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
点击下一步,创建成功
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

1.5、测试连接

进入自身容器终端
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
连接成功!

2、应用商店部署rabbitMQ

使用应用商店可以一键部署常用应用。

2.1、一键安装部署

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

点击安装
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

填写和选择相关信息后,点击下一步
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
点击安装,等待完成
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

2.2、创建外网访问服务

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

2.3、测试连接(成功)

游览器输入任意节点外网ip+端口号
http://192.168.162.31:31238/
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
目前kubesphere应用商店中只有38个应用。
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

3、应用仓库

  • docker对应仓库是docker hub来管理docker的镜像仓库
  • kubsphere对应的仓库 包管理是helm。

helm官网地址:https://helm.sh/
仓库地址:https://artifacthub.io/

使用企业空间管理员登录,设置应用仓库

仓库相关学习 Helm即可,去helm的应用市场添加一个仓库地址,比如:bitnami。

3.1 添加企业仓库

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

3.2、从模板仓库部署应用zookeeper

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
等待创建zookeeper容器完成…
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper
KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4),容器技术 Docker+K8S,elasticsearch,rabbitmq,zookeeper

至此,zookeeper从应用市场bitnami中创建成功并运行!!文章来源地址https://www.toymoban.com/news/detail-808169.html

到了这里,关于KubeSphere 核心实战之三【在kubesphere平台上部署ElasticSearch、应用商店部署RabbitMQ和应用市场部署Zookeeper】(实操篇 3/4)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 使用kubekey部署k8s集群和kubesphere、在已有k8s集群上部署kubesphere

    环境: centos 7.6、k8s 1.22.17、kubesphere v3.3.0 本篇以kubesphere v3.3.0版本讲解。 kubesphere 愿景是打造一个以 kubernetes 为内核的云原生分布式操作系统,它的架构可以非常方便地使第三方应用与云原生生态组件进行即插即用(plug-and-play)的集成,支持云原生应用在多云与多集群的统一

    2024年02月04日
    浏览(55)
  • kubesphere部署尚医通

    目录 ​​​​​​​ 项目架构  中间件 deploy.yaml 修改maven从阿里云下载镜像 部署到k8s集群  中间件 集群内地址 外部访问地址 Nacos his-nacos.his:8848 192.168.1.211:30349/nacos MySQL his-mysql.his:3306 192.168.1.211:31840 Redis his-redis.his:6379 192.168.1.211:31968 Sentinel his-sentinel.his:8080 192.168.1.211 MongoD

    2024年02月06日
    浏览(37)
  • kubesphere部署kafka单点

    2024年02月15日
    浏览(42)
  • Kubuesphere部署Ruoyi(二):部署kubesphere

    更换DNS 更换apt的镜像源 DNS字段取消注释,并修改DNS为223.5.5.5 223.5.5.5是一个IP地址,是Alibaba Cloud提供的免费DNS服务器的IP地址。 修改后保存。 https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ 建议使用http的sources,再下载 再更改回https的sources 以集群方式部署k8s和kubesphere。我们采用的工

    2023年04月19日
    浏览(25)
  • 使用KubeSphere轻松部署Bookinfo应用

    这个示例部署了一个用于演示多种 Istio 特性的应用,该应用由四个单独的微服务构成。 如安装了 Istio,说明已安装 Bookinfo。 这个应用模仿在线书店的一个分类,显示一本书的信息。 页面上会显示一本书的描述,书籍的细节(ISBN、页数等),及书评。 Bookinfo 应用分为四个单

    2024年02月03日
    浏览(41)
  • 在 Debian 12 上安装 KubeSphere 实战入门

    老 Z,运维架构师,云原生爱好者,目前专注于云原生运维,云原生领域技术栈涉及 Kubernetes、KubeSphere、DevOps、OpenStack、Ansible 等。 知识点 定级: 入门级 KubeKey 安装部署 KubeSphere 和 Kubernetes Debian 操作系统的基本配置 Kubernetes 常用工作负载的创建 KubeSphere 控制台操作入门 演示

    2024年02月10日
    浏览(40)
  • 使用 KubeSphere 部署高可用 RocketMQ 集群

    作者:老Z,云原生爱好者,目前专注于云原生运维,KubeSphere Ambassador。 Spring Cloud Alibaba 全家桶之 RocketMQ 是一款典型的分布式架构下的消息中间件产品,使用异步通信方式和发布订阅的消息传输模型。 很多基于 Spring Cloud 开发的项目都喜欢采用 RocketMQ 作为消息中间件。 Rock

    2023年04月15日
    浏览(36)
  • KubeSphere部署mysql、redis、nacos

    节点必须能够通过 SSH 连接。 节点上可以使用 sudo/curl/openssl/tar 命令。 建议您的操作系统处于干净状态(不安装任何其他软件),否则可能会发生冲突。 如果您无法从 dockerhub.io 下载容器镜像,建议提前准备仓库的镜像地址(即加速器)。 KubeKey 可以将 Kubernetes 和 KubeSphere 一

    2024年02月03日
    浏览(40)
  • Kubesphere中DevOps流水线无法部署/部署失败

    总算能让devops运行以后,流水线却卡在了deploy这一步。碰到了两个比较大的问题,一个是无法使用k8sp自带的kubeconfig认证去部署;一个是部署好了以后但是没有办法解析镜像名。 k8s:v1.21.5 k8sp:v3.3.0 pipeline 在deploy 的阶段总是报各种错。 报错内容如下: 从message来看,已经不

    2023年04月23日
    浏览(44)
  • 基于 KubeSphere 的开源微服务开发平台 Pig 最佳实践

    作者:何昌涛,北京北大英华科技有限公司高级 Java 工程师,云原生爱好者。 近年来,为了满足越来越复杂的业务需求,我们从传统单体架构系统升级为微服务架构,就是把一个大型应用程序分割成可以独立部署的小型服务,每个服务之间都是松耦合的,通过 RPC 或者是 Re

    2024年02月02日
    浏览(32)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包