当前位置:网站首页>Kubesphere - build Nacos cluster
Kubesphere - build Nacos cluster
2022-07-03 06:07:00 【Xiao bichao】
One 、KubeSphere - build nacos colony
In the last article, we passed the experiment KubeSphere
stay k8s
Build in a cluster elasticsearch
colony And Visualization tools kibana
, In this article, let's experiment together adopt KubeSphere
stay k8s
Build in a cluster nacos
colony , Here is the address of the last article :
Before the experiment , Please make sure that the installation is complete k8s
And kubesphere
Environmental Science :
Here we built nacos
It mainly stores data in mysql
in , Therefore, it should be installed in advance before the experiment mysql
service . Please refer to my blog below :
Above I created a is headless
Service for , stay k8s
The interior can provide a stable DNS
domain name , One is nodeport
, A peripheral release port is provided to facilitate mysql
To operate . Here mine DNS by :mysql.test-project
.
We need to build naocs:2.0.3
Version of cluster , It is best to download the official installation package before starting , The configuration documents and SQL We can get and modify the file directly , Download address :
among config The file under is what we need to use below :
First, create a... In the database nacos_config
database , And implement config
In the catalog nacos-mysql.sql
:
Two 、 establish application.properties
、cluster.conf
Prepare a dictionary
modify config
In the catalog application.properties
file , The specified storage mode is mysql, And designate mysql Link to :
stay kubesphere
Create a configuration dictionary in :
After the next step , Add data , The key is :application.properties
, Value just copy the contents of the above file :
Then add another data , The key is :cluster.conf
, Next, we specify both the service name and the container name as nacos
, Version is v1
edition , So the value can be written as follows :
nacos-v1-0.nacos.test-project.svc.cluster.local:8848
nacos-v1-1.nacos.test-project.svc.cluster.local:8848
nacos-v1-2.nacos.test-project.svc.cluster.local:8848
3、 ... and 、 establish nacos service
Select Create stateful service :
The service name is specified as nacos
:
The number of containers is specified as 3:
The following image is used nacos/nacos-server:v2.0.3
edition , And use the default port :
The following environment variable specifies JVM Size , It depends on the size of your server , Here just set JVM_XMS
、JVM_XMX
、JVM_XMN
:
And then the next step , Then mount the two configuration files created above :
among application.properties
Mount to :/home/nacos/conf/application.properties
,cluster.conf
Mount to :/home/nacos/conf/cluster.conf
.
All sub paths should be specified here , Otherwise, other files in this path cannot be found :
Specify a specific key :
The following is prepared in the same way cluster.conf
:
Click next below , establish .
Click the service to go in and see the created container :
Enter one at random nacos Log , You can see that the cluster has been initialized .
Four 、 by nacos Create a NodePort Service for
Now? nacos Only then k8s Only in the cluster can access , In the cluster, I can use headless
Load access , You can also build another nginx
, But none of this allows us to visit outside , So here we need to create another nodeport Service for , You can access nacos.
Select the specified workload :
Name the service :
Then specify the workload here :
Then select the one you just created nacos service :
Port we choose 8848
port :
And then the next step , Select external access ,NodePort
Pattern :
Finally create , Click this service to enter details , You can see the released port :
Now visit in the browser :http://192.168.40.130:30797/nacos
Use nacos/nacos
Sign in :
Love little buddy can pay attention to my personal WeChat official account. , Get more learning materials !
边栏推荐
- Clickhouse learning notes (I): Clickhouse installation, data type, table engine, SQL operation
- [trivia of two-dimensional array application] | [simple version] [detailed steps + code]
- Kubernetes notes (III) controller
- 1. 兩數之和
- Solve the problem that Anaconda environment cannot be accessed in PowerShell
- .NET程序配置文件操作(ini,cfg,config)
- Strategy pattern: encapsulate changes and respond flexibly to changes in requirements
- Oauth2.0 - user defined mode authorization - SMS verification code login
- Leetcode solution - 01 Two Sum
- Life is a process of continuous learning
猜你喜欢
智牛股--03
Kubernetes notes (IV) kubernetes network
[Zhao Yuqiang] deploy kubernetes cluster with binary package
Synthetic keyword and NBAC mechanism
Cesium 点击获取模型表面经纬度高程坐标(三维坐标)
Qt读写Excel--QXlsx插入图表5
Convolution operation in convolution neural network CNN
pytorch 搭建神经网络最简版
How does win7 solve the problem that telnet is not an internal or external command
Bernoulli distribution, binomial distribution and Poisson distribution, and the relationship between maximum likelihood (incomplete)
随机推荐
Detailed explanation of findloadedclass
Maximum likelihood estimation, divergence, cross entropy
phpstudy设置项目可以由局域网的其他电脑可以访问
使用 Abp.Zero 搭建第三方登录模块(一):原理篇
Bernoulli distribution, binomial distribution and Poisson distribution, and the relationship between maximum likelihood (incomplete)
Tabbar settings
Understand the first prediction stage of yolov1
Leetcode solution - 02 Add Two Numbers
Clickhouse learning notes (I): Clickhouse installation, data type, table engine, SQL operation
最大似然估计,散度,交叉熵
[teacher Zhao Yuqiang] Cassandra foundation of NoSQL database
Use telnet to check whether the port corresponding to the IP is open
Detailed explanation of contextclassloader
Solve the 1251 client does not support authentication protocol error of Navicat for MySQL connection MySQL 8.0.11
多线程与高并发(7)——从ReentrantLock到AQS源码(两万字大章,一篇理解AQS)
Virtual memory technology sharing
项目总结--01(接口的增删改查;多线程的使用)
Alibaba cloud OOS file upload
Loss function in pytorch multi classification
Installation du plug - in CAD et chargement automatique DLL, Arx