Search

Chapter 4. Networking

download PDF

4.1. DNS configuration details

4.1.1. Linux

  • CodeReady Containers expects NetworkManager to be used to manage networking.
  • NetworkManager is set up to use 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:

    server=/crc.testing/192.168.130.11
    server=/apps-crc.testing/192.168.130.11
    • The NetworkManager dnsmasq instance forwards requests for the crc.testing and apps-crc.testing domains to the 192.168.130.11 DNS server. This DNS server is a dnsmasq instance running inside of the virtual machine.

4.1.2. macOS

  • 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. This is needed by the oc binary. See OpenShift issue #23266 for more information.

4.2. Starting CodeReady Containers behind a proxy

Prerequisites

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

Procedure

  • 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 http://example.proxy.com:<port>
      $ crc config set https-proxy http://example.proxy.com:<port>
      $ crc config set no-proxy <comma-separated-no-proxy-entries>

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

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

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.