github.com/oam-dev/kubevela@v1.9.11/docs/examples/config/nacos-config/README.md (about) 1 # How to write the config to Nacos server 2 3 * Step 1: Make sure there are a nacos-server and nacos-config templates 4 5 ```bash 6 $ vela config-template list -A 7 NAMESPACE NAME ALIAS SCOPE SENSITIVE CREATED-TIME 8 vela-system nacos-config Nacos Configuration system false 2022-10-13 15:39:44 +0800 CST 9 vela-system nacos-server Nacos Server system false 2022-10-13 15:39:47 +0800 CST 10 11 # View the document of the properties 12 $ vela config-template show nacos-server 13 ``` 14 15 If not exist, please enable the VelaUX addon firstly. 16 17 * Step 2: Create a config to added a Nacos server 18 19 ```bash 20 21 # Create a nacos server config, the config name must be "nacos" 22 $ vela config create nacos --template nacos-server servers[0].ipAddr=127.0.0.1 servers[0].port=8849 23 ``` 24 25 * Step 3: Create a config to the Nacos server 26 27 ```bash 28 # Use the default template, you could define custom template. 29 $ vela config create db-config --template nacos-config dataId=db group="DEFAULT_GROUP" contentType="properties" content.host=127.0.0.1 content.port=3306 content.username=root 30 ``` 31 32 Then, the content will be written to the Nacos server. 33 34 ```properties 35 host = 127.0.0.1 36 port = 3306 37 username = root 38 ```