// Module included in the following assemblies:
//
// * installing/installing-aws-localzone.adoc (Installing a cluster on AWS with compute nodes on AWS Local Zones)
// * installing/installing-aws-wavelength-zone.adoc (Installing a cluster on AWS with commpute nodes on AWS Wavelength Zones) 

:_mod-docs-content-type: PROCEDURE
[id="installing-with-edge-node-public_{context}"]
= Optional: Assign public IP addresses to edge compute nodes

If your workload requires deploying the edge compute nodes in public subnets on {zone-type} infrastructure, you can configure the machine set manifests when installing a cluster.

AWS {zone-type} infrastructure accesses the network traffic in a specified zone, so applications can take advantage of lower latency when serving end users that are closer to that zone.

The default setting that deploys compute nodes in private subnets might not meet your needs, so consider creating edge compute nodes in public subnets when you want to apply more customization to your infrastructure.

[IMPORTANT]
====
By default, {product-title} deploy the compute nodes in private subnets. For best performance, consider placing compute nodes in subnets that have their Public IP addresses attached to the subnets.

You must create additional security groups, but ensure that you only open the groups' rules over the internet when you really need to.
====

.Procedure

. Change to the directory that contains the installation program and generate the manifest files. Ensure that the installation manifests get created at the `openshift` and `manifests` directory level.
+
[source,terminal]
----
$ ./openshift-install create manifests --dir <installation_directory> 
----

. Edit the machine set manifest that the installation program generates for the {zone-type}, so that the manifest gets deployed in public subnets. Specify `true` for the `spec.template.spec.providerSpec.value.publicIP` parameter. 
+
.Example machine set manifest configuration for installing a cluster quickly in {zone-type}
[source,yaml]
----
spec:
  template:
    spec:
      providerSpec:
        value:
          publicIp: true
          subnet:
            filters:
              - name: tag:Name
                values:
                  - ${INFRA_ID}-public-${ZONE_NAME}
----
+
.Example machine set manifest configuration for installing a cluster in an existing VPC that has {zone-type} subnets
[source,yaml]
----
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
  name: <infrastructure_id>-edge-<zone>
  namespace: openshift-machine-api
spec:
  template:
    spec:
      providerSpec:
        value:
          publicIp: true
----
