当前位置:网站首页>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 !
边栏推荐
- 从 Amazon Aurora 迁移数据到 TiDB
- Kubernetes notes (II) pod usage notes
- Kubernetes notes (10) kubernetes Monitoring & debugging
- The programmer shell with a monthly salary of more than 10000 becomes a grammar skill for secondary school. Do you often use it!!!
- How to create and configure ZABBIX
- Txt document download save as solution
- Understand the first prediction stage of yolov1
- Skywalking8.7 source code analysis (II): Custom agent, service loading, witness component version identification, transform workflow
- CKA certification notes - CKA certification experience post
- Oauth2.0 - using JWT to replace token and JWT content enhancement
猜你喜欢
![[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence](/img/a7/2140744ebad9f1dc0a609254cc618e.jpg)
[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence
![[teacher Zhao Yuqiang] calculate aggregation using MapReduce in mongodb](/img/cc/5509b62756dddc6e5d4facbc6a7c5f.jpg)
[teacher Zhao Yuqiang] calculate aggregation using MapReduce in mongodb

技术管理进阶——你了解成长的全貌吗?
![[advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer](/img/9e/a4558e8e53c9655cbc1a38e8c0536e.jpg)
[advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer

Bernoulli distribution, binomial distribution and Poisson distribution, and the relationship between maximum likelihood (incomplete)

.NET程序配置文件操作(ini,cfg,config)

phpstudy设置项目可以由局域网的其他电脑可以访问

理解 YOLOV1 第一篇 预测阶段

Phpstudy setting items can be accessed by other computers on the LAN
![[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation](/img/c2/991b8febd262cf9237017adc9d1221.jpg)
[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation
随机推荐
[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation
Detailed explanation of iptables (1): iptables concept
Redhat7系统root用户密码破解
The most responsible command line beautification tutorial
[teacher Zhao Yuqiang] index in mongodb (Part 1)
JDBC connection database steps
Understand one-way hash function
Alibaba cloud Alipay sandbox payment
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
最大似然估计,散度,交叉熵
智牛股--03
[advanced pointer (2)] | [function pointer, function pointer array, callback function] key analysis + code explanation
[minesweeping of two-dimensional array application] | [simple version] [detailed steps + code]
Sorry, this user does not exist!
Common exceptions when Jenkins is released (continuous update...)
Solve the problem that Anaconda environment cannot be accessed in PowerShell
Kubernetes notes (V) configuration management
多线程与高并发(7)——从ReentrantLock到AQS源码(两万字大章,一篇理解AQS)
卷积神经网络CNN中的卷积操作详解
pytorch 多分类中的损失函数
