Production environments can deny direct access to the Internet and instead have
an HTTP or HTTPS proxy available. You can configure a new {product-title}
cluster to use a proxy by configuring the proxy settings in the
install-config.yaml
file.
-
An existing
install-config.yaml
file. -
Review the sites that your cluster requires access to and determine whether any need to bypass the proxy. By default, all cluster egress traffic is proxied, including calls to hosting cloud provider APIs. Add sites to the Proxy object’s
spec.noProxy
field to bypass the proxy if necessary.NoteThe Proxy object’s
status.noProxy
field is populated by default with the instance metadata endpoint (169.254.169.254
) and with the values of thenetworking.machineCIDR
,networking.clusterNetwork.cidr
, andnetworking.serviceNetwork
fields from your installation configuration.
-
Edit your
install-config.yaml
file and add the proxy settings. For example:apiVersion: v1 baseDomain: my.domain.com proxy: httpProxy: http://<username>:<pswd>@<ip>:<port> (1) httpsProxy: http://<username>:<pswd>@<ip>:<port> (2) noProxy: example.com (3) additionalTrustBundle: | (4) -----BEGIN CERTIFICATE----- <MY_TRUSTED_CA_CERT> -----END CERTIFICATE----- ...
-
A proxy URL to use for creating HTTP connections outside the cluster. The URL scheme must be
http
. -
A proxy URL to use for creating HTTPS connections outside the cluster. If this field is not specified, then
httpProxy
is used for both HTTP and HTTPS connections. The URL scheme must behttp
;https
is currently not supported. -
A comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude proxying. Preface a domain with
.
to include all subdomains of that domain. Use*
to bypass proxy for all destinations. -
If provided, the installation program generates a ConfigMap that is named
user-ca-bundle
in theopenshift-config
namespace that contains one or more additional CA certificates that are required for proxying HTTPS connections. The Cluster Network Operator then creates atrusted-ca-bundle
ConfigMap that merges these contents with the {op-system-first} trust bundle, and this ConfigMap is referenced in the Proxy object’strustedCA
field. TheadditionalTrustBundle
field is required unless the proxy’s identity certificate is signed by an authority from the {op-system} trust bundle.NoteThe installation program does not support the proxy
readinessEndpoints
field.
-
-
Save the file and reference it when installing {product-title}.
The installation program creates a cluster-wide proxy that is named cluster
that uses the proxy
settings in the provided install-config.yaml
file. If no proxy settings are
provided, a cluster
Proxy object is still created, but it will have a nil
spec
.
Note
|
Only the Proxy object named |