Skip to content

Conversation

@bscott-rh
Copy link
Contributor

@bscott-rh bscott-rh commented Jan 12, 2026

@openshift-ci openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 12, 2026
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Jan 12, 2026

🤖 Fri Jan 23 16:07:04 - Prow CI generated the docs preview:
https://104652--ocpdocs-pr.netlify.app
Complete list of updated preview URLs: artifacts/updated_preview_urls.txt

@bscott-rh
Copy link
Contributor Author

@rna-afk @jinyunma Hi Aditya and Jinyun, can you PTAL at this docs PR GAing NAT gateways for 4.21? I tried to capture what I read in the QE testing tickets, but there was a lot there so please let me know if I missed anything.

azure:
outboundType:
|The outbound routing strategy used to connect your cluster to the internet. If you are using user-defined routing, you must have pre-existing networking available. The outbound routing must be configured before installing a cluster. The installation program does not configure user-defined routing. If you specify the `NatGateway` routing strategy, the installation program only creates one NAT gateway. If you specify the `NatGateway` routing strategy, your account must have the `Microsoft.Network/natGateways/read` and `Microsoft.Network/natGateways/write` permissions.
|The outbound routing strategy used to connect your cluster to the internet. If you are using user-defined routing, you must have pre-existing networking available. The outbound routing must be configured before installing a cluster. The installation program does not configure user-defined routing. If you specify the `NATGatewaySingleZone` routing strategy, the installation program only creates one NAT gateway. If you specify the `NatGateway` routing strategy, your account must have the `Microsoft.Network/natGateways/read` and `Microsoft.Network/natGateways/write` permissions. If you specify the `NATGatewayMultiZone` routing strategy, the installation program will create one NAT Gateway for each subnet that you provide using the `platform.azure.subnets` parameter. NAT Gateways can only be used for compute machines.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When configuring outboundType: NATGatewaySingleZone or outboundType: NATGatewayMultiZone, the field platform.azure.subnet is optional.

Scenario: outboundType: NATGatewaySingleZone, installer only create one NATGateway

  • If user provide the subnets, then installer attaches created NATGateway to all subnets.
  • If user does not provide the subnets, installer create two subnets ( one is for master and one is for worker), and attaches created NATGateway to each subnets.

Scenario: outboundType: NATGatewayMultiZone,

  • If user provide the subnets for node role, installer checks the zone number of specified region, and installer create NATGateways and the number is minimum value between the number of user provided subnets and zone number of specified region, then attach each NATGateways to each subnet with node role
  • If user doesn't provide the subnets, installer creates the same number of subnets and NATGateways, the number is matched with zone number of specified region, then attach each NATGateways to each worker subnet

@rna-afk do you have any comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this clear explanation Jinyun. I have incorporated this feedback into the parameter - I also re-arranged it into a short list so that the explanations can be separate for each outbound options.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A single NAT gateway can only be associated with one subnet. So, it's the first compute subnet that gets the NAT gateway and the rest do not have any. Also, NATGateway is only for compute subnet so this should be something like

Scenario: outboundType: NATGatewaySingleZone, installer only create one NATGateway

    If user provide the subnets, then installer attaches created NATGateway to the first compute subnet.
    If user does not provide the subnets, installer create two subnets ( one is for control-plane and one is for compute), and attaches created NATGateway to the compute subnet.

Scenario: outboundType: NATGatewayMultiZone,

    If user provide the subnets for node role, installer assigns a zone to each of the subnet depending on the region specified, then attaches a new NATGateway to each subnet with node role in their corresponding zone.
    If user doesn't provide the subnets, installer checks for the number of zones in the region specified and creates a compute subnet and NATGateway for each zone in the region, then attaches them to each other.

nit: Might want to use the new control-plane/compute terminology instead of the old ones but could also affect consistency with the rest of the docs. Your call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Aditya, I've incorporated your feedback. What do you mean by the new terminology instead of the old ones?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the master -> control-plane, worker -> compute

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, we need to use "control plane" and "compute" wherever possible because of conscious language guidelines.

Copy link

@jinyunma jinyunma Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rna-afk @bscott-rh

  1. For NATGatewaySingleZone scenario, If user provides subnets, only one subnet with "control-plane" role and one subnet with "node" role can be specified, and installer attaches created NATGateway to the subent with "node" role.
    Because installer does not support to specify multi subnets with "node" role in install-config when outboundType is NATGatewaySingleZone
install-config.yaml example:
----------------
platform:
  azure:
    baseDomainResourceGroupName: os4-common
    cloudName: AzurePublicCloud
    region: westus2
    outboundType: NATGatewaySingleZone
    virtualNetwork: jima-test-vnet
    networkResourceGroupName: jima-test-rg
    subnets:
    - name: subnet-1
      role: node
    - name: subnet-2
      role: node
    - name: subnet-3
      role: control-plane

$ ./openshift-install create manifests --dir ipi
ERROR failed to fetch Master Machines: failed to load asset "Install Config": failed to create install config: invalid "install-config.yaml" file: platform.azure.outboundType: Invalid value: "NATGatewaySingleZone": cannot have multiple compute subnets and outbound type single zone 
  1. For Scenario: outboundType: NATGatewayMultiZone,

If user provide the subnets for node role, installer assigns a zone to each of the subnet depending on the region specified, then attaches a new NATGateway to each subnet with node role in their corresponding zone.

What's the meaning for "installer assigns a zone to each of the subnet depending on the region specified"?
I guess it something likes that "Installer creates NATGateway in each zone depending on the region specified, then attaches NATGateway to each subnet with node role, compute node and attached NATGatway on this node's subnet are in the same zone"?

Copy link

@jinyunma jinyunma Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bscott-rh The update looks good to me now except the item2 mentioned above. @rna-afk any comment for the item2 ?

Copy link

@rna-afk rna-afk Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about If user provides the subnets for node role, installer picks up the number of zones available in the given region, creates a NAT gateway for each subnet, assigns one zone to each of the gateways in a cyclic round robin fashion and then associates the NAT gateways to the subnets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Aditya, I've reworded to match this feedback.

@bscott-rh
Copy link
Contributor Author

@jinyunma Hi Jinyun, any additional comments on this PR before I move forward with merge review? Thank you

@openshift-ci
Copy link

openshift-ci bot commented Jan 23, 2026

@bscott-rh: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch/enterprise-4.21 size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants