Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 4. Configuring Red Hat OpenShift Local


4.1. About Red Hat OpenShift Local configuration

Use the crc config command to configure both the crc executable and the Red Hat OpenShift Local instance. The crc config command requires a subcommand to act on the configuration. The available subcommands are get, set, unset, and view. The get, set, and unset subcommands operate on named configurable properties. Run the crc config --help command to list the available properties.

You can also use the crc config command to configure the behavior of the startup checks for the crc start and crc setup commands. By default, startup checks report an error and stop execution when their conditions are not met. Set the value of a property starting with skip-check to true to skip the check.

4.2. Viewing Red Hat OpenShift Local configuration

The Red Hat OpenShift Local executable provides commands to view configurable properties and the current Red Hat OpenShift Local configuration.

Procedure

  • To view the available configurable properties:

    $ crc config --help
  • To view the values for a configurable property:

    $ crc config get <property>
  • To view the complete current configuration:

    $ crc config view
    Note

    The crc config view command does not return any information if the configuration consists of default values.

4.3. Changing the selected preset

You can change the container runtime used for the Red Hat OpenShift Local instance by selecting the desired preset.

You can change the selected preset using the command line interface.

Important

You cannot change the preset of an existing Red Hat OpenShift Local instance. Preset changes are only applied when a Red Hat OpenShift Local instance is created. To enable preset changes, you must delete the existing instance and start a new one.

Procedure

  • Change the selected preset from the command line:

    $ crc config set preset <name>

    Valid preset names are:

    Table 4.1. Preset names
    NamePreset

    openshift

    OpenShift Container Platform

    microshift

    MicroShift

Additional resources

4.4. Configuring the instance

Use the cpus and memory properties to configure the default number of vCPUs and amount of memory available to the Red Hat OpenShift Local instance, respectively.

Alternatively, the number of vCPUs and amount of memory can be assigned using the --cpus and --memory flags to the crc start command, respectively.

Important

You cannot change the configuration of a running Red Hat OpenShift Local instance. To enable configuration changes, you must stop the running instance and start it again.

Procedure

  • To configure the number of vCPUs available to the instance:

    $ crc config set cpus <number>

    The default value for the cpus property is 4. The number of vCPUs to assign must be greater than or equal to the default.

  • To start the instance with the desired number of vCPUs:

    $ crc start --cpus <number>
  • To configure the memory available to the instance:

    $ crc config set memory <number-in-mib>
    Note

    Values for available memory are set in mebibytes (MiB). One gibibyte (GiB) of memory is equal to 1024 MiB.

    The default value for the memory property is 10752. The amount of memory to assign must be greater than or equal to the default.

  • To start the instance with the desired amount of memory:

    $ crc start --memory <number-in-mib>
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.