Getting Information About Worker Nodes Public IPs

You can get information about the public IPs of your worker nodes at project level using OKS CLI.

Getting Information About Worker Nodes Public IPs Using OKS CLI

Before you begin: Install and configure OKS CLI. For more information, see Installing and Configuring OKS CLI.

The project publicips command allows you to retrieve the list of public IPs of your worker nodes at project level:

Request sample
$ oks-cli project publicips \
    --project-name NAME_OF_PROJECT

This command contains the following options that you need to specify:

  • project-name: The name of the project you want to retrieve public IPs information from.

  • (optional) output: The output format for the response (json| yaml). By default, the response format is JSON.

The project publicips command returns the following elements:

  • Tags: One or more tags associated with the public IP. This element contains the following information:

    • Key: The key of the tag.

    • Value: The value of the tag.

  • PublicIp: The public IP address.

  • PublicIpId: The allocation ID of the public IP.

Result sample
[
    {
        "Tags": [
            {
                "Key": "Name",
                "Value": "NAME_OF_CLUSTER-NAME_OF_IP_POOL-ip-pool"
            },
            {
                "Key": "oks.cluster_id",
                "Value": "NAME_OF_CLUSTER"
            },
            {
                "Key": "oks.ip_pool_name",
                "Value": "NAME_OF_IP_POOL"
            },
            {
                "Key": "oks.shared",
                "Value": "true"
            }
        ],
        "PublicIp": "192.0.2.0",
        "PublicIpId": "eipalloc-12345678"
    }
]

Related Pages