1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/nw-externalip-configuring.adoc

59 lines
1.6 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/configuring_ingress_cluster_traffic/configuring-externalip.adoc
:_mod-docs-content-type: PROCEDURE
[id="nw-externalip-configuring_{context}"]
= Configure external IP address blocks for your cluster
[role="_abstract"]
As a cluster administrator, you can configure the ExternalIP settings to provide predictable entry points for external traffic to reach your cluster.
The following list details these ExternalIP settings:
- An ExternalIP address block used by {product-title} to automatically populate the `spec.clusterIP` field for a `Service` object.
- A policy object to restrict what IP addresses may be manually assigned to the `spec.clusterIP` array of a `Service` object.
.Prerequisites
* Install the {oc-first}
* Access to the cluster as a user with the `cluster-admin` role.
.Procedure
. Optional: To display the current external IP configuration, enter the following command:
+
[source,terminal]
----
$ oc describe networks.config cluster
----
. To edit the configuration, enter the following command:
+
[source,terminal]
----
$ oc edit networks.config cluster
----
. Modify the ExternalIP configuration, as in the following example:
+
[source,yaml]
----
apiVersion: config.openshift.io/v1
kind: Network
metadata:
name: cluster
spec:
...
externalIP:
...
----
* `externalIP`: Specify the configuration for the `externalIP` stanza.
. To confirm the updated ExternalIP configuration, enter the following command:
+
[source,terminal]
----
$ oc get networks.config cluster -o go-template='{{.spec.externalIP}}{{"\n"}}'
----