-
Notifications
You must be signed in to change notification settings - Fork 1.9k
OSDOCS-5074: Choosing subnets when creating a LoadBalancerService ingress Controller #85350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
92 changes: 92 additions & 0 deletions
92
modules/nw-ingress-setting-select-subnet-loadbalancerservice.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| // Modules included in the following assemblies: | ||
| // | ||
| // * ingress/configure-ingress-operator.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="nw-ingress-setting-select-subnet-Loadbalancerservice_{context}"] | ||
| = Choosing subnets while creating a LoadBalancerService Ingress Controller | ||
|
|
||
| You can manually specify load balancer subnets for Ingress Controllers in an existing cluster. By default, the load balancer subnets are automatically discovered by AWS, but specifying them in the Ingress Controller overrides this, allowing for manual control. | ||
|
|
||
| .Prerequisites | ||
| * You must have an installed AWS cluster. | ||
| * You must know the names or IDs of the subnets to which you intend to map your `IngressController`. | ||
|
|
||
| .Procedure | ||
|
|
||
| . Create a custom resource (CR) file. | ||
| + | ||
| Create a YAML file (e.g., `sample-ingress.yaml`) with the following content: | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: operator.openshift.io/v1 | ||
| kind: IngressController | ||
| metadata: | ||
| namespace: openshift-ingress-operator | ||
| name: <name> | ||
| spec: | ||
| domain: <domain> | ||
| endpointPublishingStrategy: | ||
| type: LoadBalancerService | ||
| loadBalancer: | ||
| scope: External | ||
| dnsManagementPolicy: Managed | ||
| ---- | ||
|
|
||
| . Create a custom resource (CR) file. | ||
| + | ||
| Add subnets to your YAML file: | ||
| + | ||
| -- | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: operator.openshift.io/v1 | ||
| kind: IngressController | ||
| metadata: | ||
| name: <name> <1> | ||
| namespace: openshift-ingress-operator | ||
| spec: | ||
| domain: <domain> <2> | ||
| endpointPublishingStrategy: | ||
| type: LoadBalancerService | ||
| loadBalancer: | ||
| scope: External | ||
| providerParameters: | ||
| type: AWS | ||
| aws: | ||
| type: Classic | ||
| classicLoadBalancer: <3> | ||
| subnets: | ||
| ids: <4> | ||
| - <subnet> <5> | ||
| - <subnet> | ||
| - <subnet> | ||
| dnsManagementPolicy: Managed | ||
| ---- | ||
| <1> Replace `<name>` with a name for the `IngressController`. | ||
| <2> Replace `<domain>` with the DNS name serviced by the `IngressController`. | ||
| <3> You can also use the `networkLoadBalancer` field if using an NLB. | ||
| <4> You can optionally specify a subnet by name using the `names` field instead of specifying the subnet by ID. | ||
| <5> Specify subnet IDs (or names if you using `names`). | ||
| + | ||
| [IMPORTANT] | ||
| ==== | ||
| You can specify a maximum of one subnet per availability zone. Only provide public subnets for external Ingress Controllers and private subnets for internal Ingress Controllers. | ||
| ==== | ||
| -- | ||
| + | ||
| . Apply the CR file. | ||
DCChadwick marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| .. Save the file and apply it using the {oc-first}. | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc apply -f sample-ingress.yaml | ||
| ---- | ||
| .. Confirm the load balancer was provisioned successfully by checking the `IngressController` conditions. | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get ingresscontroller -n openshift-ingress-operator <name> -o jsonpath="{.status.conditions}" | yq -PC | ||
| ---- | ||
88 changes: 88 additions & 0 deletions
88
modules/nw-ingress-setting-update-subnet-loadbalancerservice.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| // Modules included in the following assemblies: | ||
| // | ||
| // * ingress/configure-ingress-operator.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="nw-ingress-setting-update-subnet-Loadbalancerservice_{context}"] | ||
| = Updating the subnets on an existing Ingress Controller | ||
|
|
||
| You can update an `IngressController` with manually specified load balancer subnets in {product-title} to avoid any disruptions, to maintain the stability of your services, and to ensure that your network configuration aligns with your specific requirements. The following procedures show you how to select and apply new subnets, verify the configuration changes, and confirm successful load balancer provisioning. | ||
DCChadwick marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
DCChadwick marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| [WARNING] | ||
| ==== | ||
| This procedure may cause an outage that can last several minutes due to new DNS records propagation, new load balancers provisioning, and other factors. IP addresses and canonical names of the Ingress Controller load balancer might change after applying this procedure. | ||
| ==== | ||
|
|
||
| .Procedure | ||
| To update an `IngressController` with manually specified load balancer subnets, you can follow these steps: | ||
|
|
||
| . Modify the existing IngressController to update to the new subnets. | ||
| + | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: operator.openshift.io/v1 | ||
| kind: IngressController | ||
| metadata: | ||
| name: <name> <1> | ||
| namespace: openshift-ingress-operator | ||
| spec: | ||
| domain: <domain> <2> | ||
| endpointPublishingStrategy: | ||
| type: LoadBalancerService | ||
| loadBalancer: | ||
| scope: External | ||
| providerParameters: | ||
| type: AWS | ||
| aws: | ||
| type: Classic <3> | ||
| classicLoadBalancer: <4> | ||
| subnets: | ||
| ids: <5> | ||
| - <updated_subnet> <6> | ||
| - <updated_subnet> | ||
| - <updated_subnet> | ||
| ---- | ||
| <1> Replace `<name>` with a name for the `IngressController`. | ||
| <2> Replace `<domain>` with the DNS name serviced by the `IngressController`. | ||
| <3> Specify updated subnet IDs (or names if you using `names`). | ||
| <4> You can also use the `networkLoadBalancer` field if using an NLB. | ||
| <5> You can optionally specify a subnet by name using the `names` field instead of specifying the subnet by ID. | ||
| <6> Update subnet IDs (or names if you are using `names`). | ||
| + | ||
| [IMPORTANT] | ||
| ==== | ||
| You can specify a maximum of one subnet per availability zone. Only provide public subnets for external Ingress Controllers and private subnets for internal Ingress Controllers. | ||
| ==== | ||
|
|
||
DCChadwick marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| . Examine the `Progressing` condition on the `IngressController` for instructions on how to apply the subnet updates by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get ingresscontroller -n openshift-ingress-operator subnets -o jsonpath="{.status.conditions[?(@.type==\"Progressing\")]}" | yq -PC | ||
| ---- | ||
| + | ||
| .Example output | ||
| [source,terminal] | ||
| ---- | ||
| lastTransitionTime: "2024-11-25T20:19:31Z" | ||
| message: 'One or more status conditions indicate progressing: LoadBalancerProgressing=True (OperandsProgressing: One or more managed resources are progressing: The IngressController subnets were changed from [...] to [...]. To effectuate this change, you must delete the service: `oc -n openshift-ingress delete svc/router-<name>`; the service load-balancer will then be deprovisioned and a new one created. This will most likely cause the new load-balancer to have a different host name and IP address and cause disruption. To return to the previous state, you can revert the change to the IngressController: [...]' | ||
| reason: IngressControllerProgressing | ||
| status: "True" | ||
| type: Progressing | ||
| ---- | ||
|
|
||
| . To apply the update, delete the service associated with the Ingress controller by running the following command: | ||
|
|
||
| [source,terminal] | ||
| ---- | ||
| $ oc -n openshift-ingress delete svc/router-<name> | ||
| ---- | ||
|
|
||
| .Verification | ||
|
|
||
| * To confirm that the load balancer was provisioned successfully, check the `IngressController` conditions by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get ingresscontroller -n openshift-ingress-operator <name> -o jsonpath="{.status.conditions}" | yq -PC | ||
| ---- | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.