Este conteúdo não está disponível no idioma selecionado.
Chapter 1. The etcd service
The etcd service is delivered as part of the Red Hat build of MicroShift RPM. The etcd service is run as a separate process and the etcd lifecycle is managed automatically by MicroShift.
1.1. Observe and debug the MicroShift etcd server
				You can gather journalctl logs to observe and debug the etcd server logs.
			
Prerequisites
- The MicroShift service is running.
Procedure
- To get the logs for etcd, run the following command: - sudo journalctl -u microshift-etcd.scope - $ sudo journalctl -u microshift-etcd.scope- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Note- MicroShift logs can be accessed separately from etcd logs using the - journalctl -u microshiftcommand.
1.2. Checking the etcd version
You can get the version information for the etcd database included with your MicroShift by using one or both of the following methods, depending on the level of information that you need.
Procedure
- To display the base database version information, run the following command: - microshift-etcd version - $ microshift-etcd version- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - microshift-etcd Version: 4.17.1 Base etcd Version: 3.5.13 - microshift-etcd Version: 4.17.1 Base etcd Version: 3.5.13- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- To display the full database version information, run the following command: - microshift-etcd version -o json - $ microshift-etcd version -o json- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow - Example output - Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
1.3. Troubleshooting etcd
To troubleshoot etcd and improve performance, configure the memory allowance for the service.
1.4. Configuring the memoryLimitMB value to set parameters for the etcd server
By default, etcd uses as much memory as necessary to handle the load on the system. In memory-constrained systems, you might need to limit the amount of memory etcd uses.
Procedure
- Edit the - /etc/microshift/config.yamlfile to set the- memoryLimitMBvalue.- etcd: memoryLimitMB: 128 - etcd: memoryLimitMB: 128- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow Note- The minimum required value for - memoryLimitMBon MicroShift is 128 MB. Values close to the minimum value are more likely to impact etcd performance. The lower the limit, the longer etcd takes to respond to queries. If the limit is too low or the etcd usage is high, queries time out.
Verification
- After modifying the - memoryLimitMBvalue in- /etc/microshift/config.yaml, restart MicroShift by running the following command:- sudo systemctl restart microshift - $ sudo systemctl restart microshift- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Verify the new - memoryLimitMBvalue is in use by running the following command:- systemctl show --property=MemoryHigh microshift-etcd.scope - $ systemctl show --property=MemoryHigh microshift-etcd.scope- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow