Buscar

Este contenido no está disponible en el idioma seleccionado.

Chapter 1. The etcd service

download PDF

The etcd service is delivered as part of the 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
    Note

    MicroShift logs can be accessed separately from etcd logs using the journalctl -u microshift command.

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

    Example output

    microshift-etcd Version: 4.17.1
    Base etcd Version: 3.5.13

  • To display the full database version information, run the following command:

    $ microshift-etcd version -o json

    Example output

    {
      "major": "4",
      "minor": "16",
      "gitVersion": "4.17.1~rc.1",
      "gitCommit": "140777711962eb4e0b765c39dfd325fb0abb3622",
      "gitTreeState": "clean",
      "buildDate": "2024-05-10T16:37:53Z",
      "goVersion": "go1.21.9"
      "compiler": "gc",
      "platform": "linux/amd64",
      "patch": "",
      "etcdVersion": "3.5.13"
    }

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.yaml file to set the memoryLimitMB value.

    etcd:
      memoryLimitMB: 128
    Note

    The minimum required value for memoryLimitMB on 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

  1. After modifying the memoryLimitMB value in /etc/microshift/config.yaml, restart MicroShift by running the following command:

    $ sudo systemctl restart microshift
  2. Verify the new memoryLimitMB value is in use by running the following command:

    $ systemctl show --property=MemoryHigh microshift-etcd.scope
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

© 2024 Red Hat, Inc.