Manage Public IP for Master Nodes
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 or at any time afterward, without recreating the cluster or rebooting nodes.
Use Cases Copy link
- 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.
- 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 Copy link
- 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 Copy link
- Go to the Kubernetes section and select your cluster.
- Open the Management tab.
- In the Public IP section, click Change.
- Enable the Public IP option.
- 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 and use it in kubectl, CI/CD, and any other tools that connect to the cluster.
Disable a Public IP Copy link
If your cluster has a single master node, the API server may be unavailable for up to a minute while the change is applied.
- Go to the Kubernetes section and select your cluster.
- Open the Management tab.
- In the Public IP section, click Change.
- Disable the Public IP option.
- Click Save.
After you save, the API server is reachable only from the private network.