|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * ingress/configure-ingress-operator.adoc |
| 4 | + |
| 5 | +[id="nw-ingress-controller-configuration-gcp-global-access_{context}"] |
| 6 | += Configuring global access for an Ingress Controller on GCP |
| 7 | + |
| 8 | +An Ingress Controller created on GCP with an internal load balancer generates an internal IP address for the service. A cluster administrator can specify the global access option, which enables clients in any region within the same VPC network and compute region as the load balancer, to reach the workloads running on your cluster. |
| 9 | + |
| 10 | +For more information, see the GCP documentation for link:https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#global_access[global access]. |
| 11 | + |
| 12 | +.Prerequisites |
| 13 | + |
| 14 | +* You deployed an {product-title} cluster on GCP infrastructure. |
| 15 | +* You configured an Ingress Controller to use an internal load balancer. |
| 16 | +* You installed the OpenShift CLI (`oc`). |
| 17 | + |
| 18 | +.Procedure |
| 19 | + |
| 20 | +. Configure the Ingress Controller resource to allow global access. |
| 21 | ++ |
| 22 | +[NOTE] |
| 23 | +==== |
| 24 | +You can also create an Ingress Controller and specify the global access option. |
| 25 | +==== |
| 26 | ++ |
| 27 | +.. Configure the Ingress Controller resource: |
| 28 | ++ |
| 29 | +[source,terminal] |
| 30 | +---- |
| 31 | +$ oc -n openshift-ingress-operator edit ingresscontroller/default |
| 32 | +---- |
| 33 | ++ |
| 34 | +.. Edit the YAML file: |
| 35 | ++ |
| 36 | +.Sample `clientAccess` configuration to `Global` |
| 37 | +[source,yaml] |
| 38 | +---- |
| 39 | + spec: |
| 40 | + endpointPublishingStrategy: |
| 41 | + loadBalancer: |
| 42 | + providerParameters: |
| 43 | + gcp: |
| 44 | + clientAccess: Global <1> |
| 45 | + type: GCP |
| 46 | + scope: Internal |
| 47 | + type: LoadBalancerService |
| 48 | +---- |
| 49 | +<1> Set `gcp.clientAccess` to `Global`. |
| 50 | + |
| 51 | +.. Save the file to apply the changes. |
| 52 | ++ |
| 53 | +. Run the following command to verify that the service allows global access: |
| 54 | ++ |
| 55 | +[source,terminal] |
| 56 | +---- |
| 57 | +$ oc -n openshift-ingress operator edit svc/router-default -o yaml |
| 58 | +---- |
| 59 | ++ |
| 60 | +The output shows that global access is enabled for GCP with the annotation, `networking.gke.io/internal-load-balancer-allow-global-access`. |
0 commit comments