Changing the IP address

Learn how to safely change the management IP of NGINX Controller .

Overview

This topic explains how to safely update the management IP of NGINX Controller.

See Also:

For instructions on how to deploy NGINX Controller as a multi-node resilient cluster, refer to the following deployment guide:

Changing the IP of a multi-node cluster

To change the IP of a multi-node cluster, follow the steps below for each node in the cluster:

1. Remove node from the cluster

Important:
Deleting nodes makes NGINX Controller momentarily unavailable while the cluster is being updated. Therefore, we recommend updating NGINX Controller during a planned maintenance window to minimize disruptions. When deleting nodes, make sure that at least two nodes are always operational. If the cluster has fewer than two working nodes, NGINX Controller may become unresponsive, and you may not be able to add new nodes.

To delete a node from the cluster using the web interface:

  1. Open the NGINX Controller web interface and log in.
  2. Select the NGINX Controller menu icon, then select Platform.
  3. On the Platform menu, select Cluster.
  4. On the Cluster overview page, choose the node you want to delete, then select Delete (trash icon).
  5. Select Delete to confirm.
See Also:
To delete nodes from your cluster using the NGINX Controller REST API, send a DELETE request to the /platform/nodes endpoint.

2. Change the IP address (public & private)

Refer to your Linux distribution documentation for specific instructions.

3. Reboot the node

4. Add the node back to the cluster

Take the following steps to add a node to the cluster:

  1. Open the NGINX Controller web interface and log in.

  2. Select the NGINX Controller menu icon, then select Platform.

  3. On the Platform menu, select Cluster.

  4. On the Cluster overview page, select Create Node.

  5. Add a name for the node.

  6. (Optional) Add a description.

  7. Add the hostname or IP address – or both – for the node.

  8. Select Save. The new node appears in the list of nodes on the Cluster overview page with a Configuring status.

  9. Choose the new node’s name in the list, then select View (eye icon). A page with command-line instructions for adding the node appears.

  10. Copy the install.sh command and join-key that are shown.

  11. Open an SSH connection to the node that you’re adding to the cluster.

  12. Uninstall NGINX Controller from the node if you haven’t already, and then continue with the remaining steps in this procedure:

    /opt/nginx-controller/uninstall.sh
    
  13. Upload and extract the controller-installer-<version>.tar.gz tarball.

  14. Run the install.sh command with the join-key copied in the previous step. If the join-key has expired, you can get a new one by following the steps in this topic to add a node using the web interface or the NGINX Controller REST API.

    cd controller-installer
    ./install.sh --join-key <long-value>
    
  15. After the installation is complete, the node status in the web interface changes to Configured.

See Also:
To add nodes to your cluster using the NGINX Controller REST API, send a POST request to the /platform/nodes endpoint.

5. Change the FQDN

Change the FQDN if it has been affected by the IP change.

Important:
Repeat the steps for each node in the cluster.

Changing the IP of a single node

To change the IP of a single node:

  1. Change the IP of the node (public and private). Refer to your Linux distribution documentation for specific instructions.

  2. Reboot the node.

  3. Run the following command (only required if smtp was affected by the IP change):

    opt/nginx-controller/helper.sh configsmtp <smtp_host> <smtp_port> false <do-not-reply-email>
    
  4. Change the FQDN if it has been affected by the IP change.


This documentation applies to the following versions of NGINX Controller: 3.12, 3.13, 3.14, 3.15, 3.16.1, 3.17, 3.18, 3.18.1, 3.18.2 and 3.18.3.


This documentation applies to the following versions of NGINX Controller API Management module: 3.18, 3.18.1, 3.19, 3.19.1, 3.19.2, 3.19.3 and 3.19.4.


This documentation applies to the following versions of NGINX Controller App Delivery module: 3.20, 3.20.1, 3.21, 3.22, 3.22.1, 3.22.2 and 3.22.3.