Creating an IP Pool
You can create IP pools to allocate pools of public IP addresses to the worker nodes of your clusters.
Creating an IP Pool
To create an IP pool, you must first define it using a Kubernetes manifest with the required annotations. You can also mark an IP pool as persistent, meaning it will not be automatically deleted when a cluster is removed. This is useful for reusing the same IPs across cluster lifecycles (e.g., to preserve DNS records or database connections).
For more information about manifests, see Node Pool Manifest Reference.
The following example creates a persistent IP pool of 8 addresses using a manifest:
---
apiVersion: oks.dev/v1beta
kind: IPPool
metadata:
name: example-ip-pool
spec:
numAddresses: 8
persistent: true
This manifest contains two important parameters for defining the behavior of the IP address pool:
-
numAddresses
: Specifies how many IP addresses to allocate. -
persistent
: Iftrue
, prevents the auto-deletion of IP pools when a cluster is deleted.
IP addresses are allocated in batches of 5 addresses. You can monitor their status using the get ippools command:
$ kubectl get ippools -o wide -w
NAME DECLARED ADDRESSES ALLOCATED ADDRESSES LINKED ADDRESSES UNLINKED ADDRESSES LAST ERROR
example-ip-pool 8 5 0 5 None
example-ip-pool 8 5 0 5 None
example-ip-pool 8 8 0 8 None
[
{
"Tags": [
{
"Key": "oks.shared",
"Value": "true" },
{
"Key": "oks.ip_pool_name",
"Value": "example-ip-pool"
},
{ "Key": "oks.cluster_id",
"Value": "rku-42"
},
{
"Key": "Name",
"Value": "rku-42-example-ip-pool-ip-pool"
}
],
"PublicIp": "111.1.1.1"
},
...
]
The presence of the tag "oks.shared”: “true”
indicates that the pool is persistent.
Related Pages