Chapter 5. Networking

5.1. DNS configuration details

5.1.1. General DNS setup

The OpenShift cluster managed by CodeReady Containers uses 2 DNS domain names, crc.testing and apps-crc.testing. The crc.testing domain is for core OpenShift services. The apps-crc.testing domain is for accessing OpenShift applications deployed on the cluster.

For example, the OpenShift API server will be exposed as api.crc.testing while the OpenShift console is accessed through console-openshift-console.apps-crc.testing. These DNS domains are served by a dnsmasq DNS container running inside the CodeReady Containers virtual machine.

Running crc setup will adjust your system DNS configuration so that it can resolve these domains. Additional checks are done to verify DNS is properly configured when running crc start.

5.1.2. Linux

On Linux, CodeReady Containers expects the following DNS configuration:

  • CodeReady Containers expects NetworkManager to manage networking.
  • NetworkManager uses dnsmasq through the /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf configuration file.
  • The configuration file for this dnsmasq instance is /etc/NetworkManager/dnsmasq.d/crc.conf:

    • The NetworkManager dnsmasq instance forwards requests for the crc.testing and apps-crc.testing domains to the DNS server.

5.1.3. macOS

On macOS, CodeReady Containers expects the following DNS configuration:

  • CodeReady Containers creates a /etc/resolver/testing file which instructs macOS to forward all DNS requests for the testing domain to the CodeReady Containers virtual machine.
  • CodeReady Containers also adds an api.crc.testing entry to /etc/hosts pointing at the VM IP address. The oc binary requires this entry. See OpenShift issue #23266 for more information.

5.2. Starting CodeReady Containers behind a proxy


  • To use an existing oc binary on your host machine, export the .testing domain as part of the no_proxy environment variable.
  • The embedded oc binary does not require manual settings. For more information about using the embedded oc binary, see Section 3.3.2, “Accessing the OpenShift cluster with oc.


  • To start CodeReady Containers behind a proxy:

    1. Define a proxy using the http_proxy and https_proxy environment variables or using the crc config set command as follows:

      $ crc config set http-proxy<port>
      $ crc config set https-proxy<port>
      $ crc config set no-proxy <comma-separated-no-proxy-entries>

      The crc binary will be able to use the defined proxy once set through environment variables or CodeReady Containers configuration.

  • Proxy-related values set in the configuration for CodeReady Containers have priority over values set through environment variables.
  • SOCKS proxies are not supported by OpenShift Container Platform.