当前位置:网站首页>[cloud native topic -50]:kubesphere cloud Governance - operation - step by step deployment of microservice based business applications - database middleware MySQL microservice deployment process
[cloud native topic -50]:kubesphere cloud Governance - operation - step by step deployment of microservice based business applications - database middleware MySQL microservice deployment process
2022-07-02 20:04:00 【Silicon based workshop of slow fire rock sugar】
Author URI ( Silicon based workshop of slow fire rock sugar ): Slow fire rock sugar ( Wang Wenbing ) The blog of _ Silicon based workshop of slow fire rock sugar _CSDN Blog
Website of this article :https://blog.csdn.net/HiWangWenBing/article/details/122927050
Catalog
The first 1 Step : precondition
1.1 stay Kubesphere Select project space ( Namespace )
1.2 stay dockerhub find MySQL Required configuration parameters for deployment
1.3 MySql server Deployment planning
1.4 Pre created outside the microservice PVC Persistent volume
1.5 Pre created outside the microservice MySQL Configuration file for
The first 2 Step : Deploy mysql Microservices
2.2 Hang on external persistent volumes
2.3 Mount external configuration file
2.4 Check the image installation
step 3: by mysql establish Service service object
3.1 establish clusterIP service object ( Only internal cluster access )
Preface :
MySQL It is the middleware of microservice business application , It's also a microservice , It can be deployed separately , Follow the basic process of microservice deployment .
The first 1 Step : precondition
1.1 stay Kubesphere Select project space ( Namespace )
1.2 stay dockerhub find MySQL Required configuration parameters for deployment
(1)docker hub Home page
(2)search “mysql”
https://hub.docker.com/_/mysql

$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag
# Expose profile
$ docker run --name some-mysql -v /my/custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tagmysql It is not accessed arbitrarily , User name required + Password authentication .
therefore ,mysql The startup of the needs to be accessed through the setting of environment variables mysql Password .
1.3 MySql server Deployment planning

- PVC be used for MySql Use on the outside of the container ( Write ) Persistence MySql Of Business data
- ConfigMap be used for MySql In the container external Use ( read ) The configuration file
1.4 Pre created outside the microservice PVC Persistent volume


1.5 Pre created outside the microservice MySQL Configuration file for

MySQL There is a lot of configuration information , We can choose several experiments :
[client]
port = 3306
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
The first 2 Step : Deploy mysql Microservices
2.1 Install container image





2.2 Hang on external persistent volumes

2.3 Mount external configuration file

2.4 Check the image installation



step 3: by mysql establish Service service object
3.1 establish clusterIP service object ( Only internal cluster access )

Get into Service, Access by service name MySQL service :


mysql -u root -h his-mysql-glgf.his -p
1234563.2 establish NodePort service object ( It can be accessed through the public network MySQL service )



Outside the cluster ( Public network host ), adopt mysql Client access MySQL service

- Install client in advance
MySQL :: Download MySQL Workbench
- Access password :123456 ( Install the password set through the environment variable )
Author URI ( Silicon based workshop of slow fire rock sugar ): Slow fire rock sugar ( Wang Wenbing ) The blog of _ Silicon based workshop of slow fire rock sugar _CSDN Blog
Website of this article :https://blog.csdn.net/HiWangWenBing/article/details/122927050
边栏推荐
- Jetson XAVIER NX上ResUnet-TensorRT8.2速度与显存记录表(后续不断补充)
- 功能、作用、效能、功用、效用、功效
- Development skills of rxjs observable custom operator
- 自动化制作视频
- API documentation tool knife4j usage details
- Embedded (PLD) series, epf10k50rc240-3n programmable logic device
- Postman interface test practice, these five questions you must know
- C language linked list -- to be added
- 编写完10万行代码,我发了篇长文吐槽Rust
- What are the benefits of multi terminal applet development? Covering Baidu applet, Tiktok applet, wechat applet development, and seizing the multi platform traffic dividend
猜你喜欢

测试人员如何做不漏测?这7点就够了

ShardingSphere-JDBC5.1.2版本关于SELECT LAST_INSERT_ID()本人发现还是存在路由问题

接口测试到底怎么做?看完这篇文章就能清晰明了

有时候只查询一行语句,执行也慢

RPD product: super power squad nanny strategy

CRM Customer Relationship Management System

API文档工具knife4j使用详解

Summary of interview experience, escort your offer, full of knowledge points

AcWing 1126. Minimum cost solution (shortest path Dijkstra)

SBT tutorial
随机推荐
Outsourcing for three years, abandoned
浏览器缓存机制概述
Implementation of online shopping mall system based on SSM
Automated video production
Codeforces Round #771 (Div. 2)(A-C)
AcWing 341. Optimal trade solution (shortest path, DP)
JASMINER X4 1U deep disassembly reveals the secret behind high efficiency and power saving
Spark source code compilation, cluster deployment and SBT development environment integration in idea
蓝牙芯片ble是什么,以及该如何选型,后续技术发展的路径是什么
【871. 最低加油次数】
Postman接口测试实战,这5个问题你一定要知道
Cron表达式(七子表达式)
在消费互联网时代,诞生了为数不多的头部平台的话
C language linked list -- to be added
How can testers do without missing tests? Seven o'clock is enough
疫情封控65天,我的居家办公心得分享 | 社区征文
AcWing 1126. Minimum cost solution (shortest path Dijkstra)
Google Earth engine (GEE) - Landsat 9 image full band image download (Beijing as an example)
Function, function, efficiency, function, utility, efficacy
Complete example of pytorch model saving +does pytorch model saving only save trainable parameters? Yes (+ solution)