Questo contenuto non è disponibile nella lingua selezionata.
Chapter 8. Configuring the Ingress Controller endpoint publishing strategy
8.1. Ingress Controller endpoint publishing strategy Copia collegamentoCollegamento copiato negli appunti!
NodePortService endpoint publishing strategy
The
NodePortService
In this configuration, the Ingress Controller deployment uses container networking. A
NodePortService
NodePortService
Figure 8.1. Diagram of NodePortService
The preceding graphic shows the following concepts pertaining to OpenShift Container Platform Ingress NodePort endpoint publishing strategy:
- All the available nodes in the cluster have their own, externally accessible IP addresses. The service running in the cluster is bound to the unique NodePort for all the nodes.
-
When the client connects to a node that is down, for example, by connecting the IP address in the graphic, the node port directly connects the client to an available node that is running the service. In this scenario, no load balancing is required. As the image shows, the
10.0.128.4address is down and another IP address must be used instead.10.0.128.4
The Ingress Operator ignores any updates to
.spec.ports[].nodePort
By default, ports are allocated automatically and you can access the port allocations for integrations. However, sometimes static port allocations are necessary to integrate with existing infrastructure which may not be easily reconfigured in response to dynamic ports. To achieve integrations with static node ports, you can update the managed service resource directly.
For more information, see the Kubernetes Services documentation on NodePort.
HostNetwork endpoint publishing strategy
The
HostNetwork
An Ingress Controller with the
HostNetwork
80
443
8.1.1. Configuring the Ingress Controller endpoint publishing scope to Internal Copia collegamentoCollegamento copiato negli appunti!
When a cluster administrator installs a new cluster without specifying that the cluster is private, the default Ingress Controller is created with a
scope
External
External
Internal
Prerequisites
-
You installed the CLI.
oc
Procedure
To change an
scoped Ingress Controller toExternal, enter the following command:Internal$ oc -n openshift-ingress-operator patch ingresscontrollers/default --type=merge --patch='{"spec":{"endpointPublishingStrategy":{"type":"LoadBalancerService","loadBalancer":{"scope":"Internal"}}}}'To check the status of the Ingress Controller, enter the following command:
$ oc -n openshift-ingress-operator get ingresscontrollers/default -o yamlThe
status condition indicates whether you must take further action. For example, the status condition can indicate that you need to delete the service by entering the following command:Progressing$ oc -n openshift-ingress delete services/router-defaultIf you delete the service, the Ingress Operator recreates it as
.Internal
8.1.2. Configuring the Ingress Controller endpoint publishing scope to External Copia collegamentoCollegamento copiato negli appunti!
When a cluster administrator installs a new cluster without specifying that the cluster is private, the default Ingress Controller is created with a
scope
External
The Ingress Controller’s scope can be configured to be
Internal
Internal
External
On some platforms, it is necessary to delete and recreate the service.
Changing the scope can cause disruption to Ingress traffic, potentially for several minutes. This applies to platforms where it is necessary to delete and recreate the service, because the procedure can cause OpenShift Container Platform to deprovision the existing service load balancer, provision a new one, and update DNS.
Prerequisites
-
You installed the CLI.
oc
Procedure
To change an
scoped Ingress Controller toInternal, enter the following command:External$ oc -n openshift-ingress-operator patch ingresscontrollers/private --type=merge --patch='{"spec":{"endpointPublishingStrategy":{"type":"LoadBalancerService","loadBalancer":{"scope":"External"}}}}'To check the status of the Ingress Controller, enter the following command:
$ oc -n openshift-ingress-operator get ingresscontrollers/default -o yamlThe
status condition indicates whether you must take further action. For example, the status condition can indicate that you need to delete the service by entering the following command:Progressing$ oc -n openshift-ingress delete services/router-defaultIf you delete the service, the Ingress Operator recreates it as
.External