首页 > 数据库 >kubesphere搭建nacos2.2.3(MySQL)

kubesphere搭建nacos2.2.3(MySQL)

时间:2024-10-23 15:48:07浏览次数:3  
标签:core kubesphere db nacos auth server MySQL nacos2.2 ###

环境准备

创建nacos数据库,sql来自于nacos官网,自行查找并执行

启动环境配置如图

在字典中添加配置
如图配置设置

具体配置如下具体含义请参考nacos官网


#*************** Spring Boot Related Configurations ***************#
### Default web context path:
server.servlet.contextPath=/nacos
### Include message field
server.error.include-message=ALWAYS
### Default web server port:
server.port=8848

#*************** Config Module Related Configurations ***************#
### If use MySQL as datasource:
### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced.
spring.sql.init.platform=mysql

### Count of DB:
db.num=1

### Connect URL of DB:
db.url.0=jdbc:mysql://192.168.31.112/nacos_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user.0=root
db.password.0=123456

### Connection pool configuration: hikariCP
db.pool.config.connectionTimeout=30000
db.pool.config.validationTimeout=10000
db.pool.config.maximumPoolSize=20
db.pool.config.minimumIdle=2

### the maximum retry times for push
nacos.config.push.maxRetryTime=50

#***********Metrics for tomcat **************************#
server.tomcat.mbeanregistry.enabled=true

#***********Expose prometheus and health **************************#
#management.endpoints.web.exposure.include=prometheus,health

### Metrics for elastic search
management.metrics.export.elastic.enabled=false
#management.metrics.export.elastic.host=http://localhost:9200

### Metrics for influx
management.metrics.export.influx.enabled=false
#management.metrics.export.influx.db=springboot
#management.metrics.export.influx.uri=http://localhost:8086
#management.metrics.export.influx.auto-create-db=true
#management.metrics.export.influx.consistency=one
#management.metrics.export.influx.compressed=true

#*************** Access Log Related Configurations ***************#
### If turn on the access log:
server.tomcat.accesslog.enabled=true

### file name pattern, one file per hour
server.tomcat.accesslog.rotate=true
server.tomcat.accesslog.file-date-format=.yyyy-MM-dd-HH
### The access log pattern:
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i

### The directory of access log:
server.tomcat.basedir=file:.

#*************** Access Control Related Configurations ***************#
### If enable spring security, this option is deprecated in 1.2.0:
#spring.security.enabled=false

### The ignore urls of auth
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**

### The auth system to use, currently only 'nacos' and 'ldap' is supported:
nacos.core.auth.system.type=nacos

### If turn on auth system:
nacos.core.auth.enabled=true

### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.
nacos.core.auth.caching.enabled=true

### Since 1.4.1, Turn on/off white auth for user-agent: nacos-server, only for upgrade from old version.
nacos.core.auth.enable.userAgentAuthWhite=false

### Since 1.4.1, worked when nacos.core.auth.enabled=true and nacos.core.auth.enable.userAgentAuthWhite=false.
### The two properties is the white list for auth and used by identity the request from other server.
nacos.core.auth.server.identity.key=nacos
nacos.core.auth.server.identity.value=nacos

### worked when nacos.core.auth.system.type=nacos
### The token expiration in seconds:
nacos.core.auth.plugin.nacos.token.cache.enable=false
nacos.core.auth.plugin.nacos.token.expire.seconds=18000
### The default token (Base64 String):
nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345623423456778901235678901456789018901234567890123456789
### If turn on the MCP server:
nacos.istio.mcp.server.enabled=false

创建容器

在这里插入图片描述
在这里插入图片描述
这里环境变量时单机运行,可以设置运行内存垃圾回收等
引入刚刚配置的环境

具体路径:/home/nacos/conf/application.properties

让nacos能够外网访问

服务-创建
创建指定工作负载
指定工作负载
添加端口,然后下一步
选择外网访问
在这里插入图片描述
这里可以修改外网访问的端口号
在这里插入图片描述

感谢阅读,至此全部流程结束!!!!!!!!

标签:core,kubesphere,db,nacos,auth,server,MySQL,nacos2.2,###
From: https://blog.csdn.net/Llianaixiaoqu/article/details/143135471

相关文章

  • 高效集成:旺店通旗舰版与MySQL的数据对接方案
    旺店通旗舰版-其他入库单-->BI泰海-其他入库单表_原始查询(2024年起)数据集成方案在现代企业的数据管理中,如何高效、可靠地实现系统间的数据对接是一个关键挑战。本文将分享一个具体的技术案例,展示如何通过轻易云数据集成平台,将旺店通·旗舰奇门的数据无缝集成到MySQL数据库中。......
  • MySQL 回收表碎片实践教程
    前言:在MySQL数据库中,随着数据的增删改操作,表空间可能会出现碎片化,这不仅会占用额外的存储空间,还可能降低表的扫描效率,特别是一些大表,在进行数据清理后会产生大量的碎片。本篇文章我们一起来学习下如何进行碎片回收以及相关注意点。查看表碎片大小一般MySQL数据库都是开启i......
  • docker安装mysql
    本次分享docker安装mysql,没有废话,绝对全网最简单首先你需要已经安装过docker,在这里默认已安装过docker。安装mysql命令:dockerrun--namemysql-p3306:3306-eMYSQL_ROOT_PASSWORD=123456-dmysql:5.7--lower_case_table_names=1其中密码和mysql版本可自己改然后......
  • 一文彻底搞定Redis与MySQL的数据同步
    Redis和MySQL一致性问题是企业级应用中常见的挑战之一,特别是在高并发、高可用的场景下。由于Redis是内存型数据库,具备极高的读写速度,而MySQL作为持久化数据库,通常用于数据的可靠存储,如何保证两者数据的一致性需要具体业务场景的设计与优化。下面我们将结合几个典型的业务......
  • linux 一键部署mysql 8.4.2 绿色版
    亲测有效vimdeploy_mysql.sh#!/bin/bash#mysql安装目录是${wget_path}/${mysql_dir}#修改mysql的登录密码updatePassword="sykj@2024"wget_path="/data"mysql_dir="mysql"#.tar.xz文件mysql_dowmload_path="https://downloads.mysql.com/......
  • MySQL根据.idb数据恢复脚本,做成了EXE可执行文件
    文章目录1.代码2.Main方法打包3.Jar包打成exe可执行文件4.使用(1.)准备一个表结构一样得数据库(2.)打开软件(3.)输入路径5.恢复成功本文档只是为了留档方便以后工作运维,或者给同事分享文档内容比较简陋命令也不是特别全,不适合小白观看,如有不懂可以私信,上班期间都是在得......
  • 高效同步MySQL数据的实战案例:唯品配货通知单明细表
    MySQL数据集成案例分享:13--BI秉心-唯品配货通知单明细表--vipdispatchorderdetail_z-->vipdispatchorderdetail在数据驱动的业务环境中,如何高效、可靠地实现数据的集成和同步是每个企业面临的重要挑战。本文将聚焦于一个具体的系统对接集成案例,展示如何通过轻易云数据集成平台,将......
  • MYSQL字符串中根据符号匹配固定字符
    如果您有一个字段存储的是多个值,例如分号分隔的字符串,而您仍然需要进行精准匹配,可以使用FIND_IN_SET函数,但需要注意FIND_IN_SET是基于逗号分隔的字符串。如果您的字段是分号分隔的,可以先将其转换为逗号分隔的字符串。假设users表的roles字段存储的是分号分隔的字符串 ......
  • Django+MySQL接口开发完全指南
    前言本文将详细介绍如何使用Django结合MySQL数据库开发RESTfulAPI接口。我们将从环境搭建开始,一步步实现一个完整的接口项目。环境准备首先需要安装以下组件:Python3.8+Django4.2MySQL8.0mysqlclientdjangorestframework安装命令#创建虚拟环境python-mvenvvenvs......
  • MySQL【知识改变命运】11
    联合查询6.⼦查询6.1语法6.2单⾏⼦查询6.3多⾏⼦查询6.4多列⼦查询6.5在from⼦句中使⽤⼦查询7.合并查询7.1创建新表并初始化数据7.2Union7.3Unionall8.插⼊查询结果8.1语法8.2⽰例6.⼦查询⼦查询是把⼀个SELECT语句的结果当做别⼀个SELECT语句的......