---
title: "Manage Public IP for Kubernetes Master Nodes | Hostman Docs"
description: "Learn how to enable or disable the public IP of Kubernetes master nodes to open or restrict internet access to the API server without rebooting nodes."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

The public IP address of the master nodes controls whether the Kubernetes API server is reachable from the internet. You can add or remove it when you [create a cluster](https://hostman.com/docs/kubernetes/create-clusters/) or at any time afterward, without recreating the cluster or rebooting nodes.

## Use Cases

-   **Restrict access to the API server**: If you remove the public IP, the API server is reachable only from the private network. You can still manage the cluster [through a bastion host](https://hostman.com/docs/kubernetes/connect-to-clusters/bastion-host/).
-   **Open access temporarily**: Attach a public IP for the duration of a migration or for external CI/CD or monitoring, then disable it again.

## Notes and Limitations 

-   Public IP addresses for master nodes are free.
-   Addresses are assigned automatically. You can't select an existing public IP from your account.
-   Each time you enable the public IP, the master nodes get a new address.
-   Changes apply without a reboot or any cluster downtime.

## Enable a Public IP

1.  Go to the [**Kubernetes**](https://hostman.com/my/kubernetes) section and select your cluster.
2.  Open the **Management** tab.
3.  In the **Public IP** section, click **Change**.
4.  Enable the **Public IP** option.
5.  Click **Save**.

After you save, the master nodes get a new public IP address. The API server address in your `kubeconfig` file changes too, so [download the updated file](https://hostman.com/docs/kubernetes/connect-to-clusters/kubectl/#download-the-kubeconfig-configuration-file) and use it in `kubectl`, CI/CD, and any other tools that connect to the cluster.

## Disable a Public IP

If your cluster has a single master node, the API server may be unavailable for up to a minute while the change is applied.

1.  Go to the [**Kubernetes**](https://hostman.com/my/kubernetes) section and select your cluster.
2.  Open the **Management** tab.
3.  In the **Public IP** section, click **Change**.
4.  Disable the **Public IP** option.
5.  Click **Save**.

After you save, the API server is reachable only from the private network.
