Chapter 4. Networking
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 thecrc.testing
andapps-crc.testing
domains to the192.168.130.11
DNS server. This DNS server is adnsmasq
instance running inside of the virtual machine.
-
The NetworkManager
4.1.2. macOS
-
CodeReady Containers creates a
/etc/resolver/testing
file which instructs macOS to forward all DNS requests for thetesting
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 theoc
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 theno_proxy
environment variable. -
No manual settings are required to use the embedded
oc
binary. For more information on using the embeddedoc
binary, see Section 3.3.2, “Accessing the OpenShift cluster withoc
”.
Procedure
To start CodeReady Containers behind a proxy:
Define a proxy using the
http_proxy
andhttps_proxy
environment variables or using thecrc 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.
- 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.