linode-cli-nodebalancers
Manage Linode NodeBalancers from the command line
TLDR
List all NodeBalancers
Create a new NodeBalancer
View details of a specific NodeBalancer
Update an existing NodeBalancer
Delete a NodeBalancer
List configurations for a NodeBalancer
Add a new configuration to a NodeBalancer
SYNOPSIS
linode-cli nodebalancers <action> [<sub_action>] [<arguments>] [<options>]
PARAMETERS
<action>
Specifies the primary operation to perform on NodeBalancers. Common actions include: list (list all NodeBalancers), view (show details for a specific NodeBalancer), create (create a new NodeBalancer), update (modify an existing NodeBalancer), delete (remove a NodeBalancer), configs (manage NodeBalancer configurations), and nodes (manage backend nodes for a configuration).
<sub_action>
Used with actions like configs or nodes to specify further operations (e.g., linode-cli nodebalancers configs list or linode-cli nodebalancers nodes create).
<arguments>
Positional or keyword arguments required for specific actions, such as NodeBalancer ID, configuration ID, or parameters for creation/update (e.g., --label, --region).
--json
Formats the command output as a JSON object, suitable for scripting and programmatic parsing.
--text
Formats the command output as human-readable plain text, typically with columns and rows.
--csv
Formats the command output as Comma Separated Values, useful for spreadsheet imports.
--columns <columns>
Specifies a comma-separated list of columns to display in text or CSV output (e.g., --columns id,label,ipv4).
--no-headers
Suppresses the display of column headers in text or CSV output.
--token <api_token>
Provides the Linode API token directly via the command line, overriding any configured token. (Global Linode CLI option).
--id <id>
Used with actions like view, update, or delete to specify the unique ID of the NodeBalancer, config, or node to operate on.
--label <label>
A user-defined string label for the NodeBalancer, used during creation or update.
--region <region_id>
The region where the NodeBalancer will be deployed (e.g., us-east), required for creation.
--tags <tag1,tag2,...>
A comma-separated list of tags to apply to the NodeBalancer resource.
--ipv4 <ip_address>
The IPv4 address of the NodeBalancer (read-only for existing NodeBalancers).
--ipv6 <ip_address>
The IPv6 address of the NodeBalancer (read-only for existing NodeBalancers).
DESCRIPTION
The linode-cli-nodebalancers command is a specialized subcommand within the Linode Command Line Interface (CLI) that allows users to manage Linode NodeBalancers. NodeBalancers are Linode's highly available Layer 4 (TCP/UDP) load balancing services, designed to distribute incoming network traffic across multiple backend Linode instances, ensuring high availability and improved application performance.
This command provides a comprehensive suite of actions to interact with NodeBalancers, including listing existing ones, viewing detailed information about a specific NodeBalancer, creating new ones, updating their properties, and deleting them. Beyond the core NodeBalancer resource, it also allows management of NodeBalancer configurations (e.g., ports, protocols, stickiness policies) and the individual backend nodes (servers) associated with those configurations. It serves as a programmatic interface to automate NodeBalancer provisioning and management tasks, making it an essential tool for developers and system administrators working with Linode infrastructure.
CAVEATS
1. Linode CLI Installation: This command requires the linode-cli package to be installed and properly configured with a Linode API token.
2. API Token Permissions: The API token used must have appropriate read/write permissions for NodeBalancers.
3. Destructive Actions: Commands like delete are irreversible and will permanently remove the specified NodeBalancer and its associated configurations and nodes.
4. Rate Limiting: Linode API calls are subject to rate limits. Excessive or rapid requests may result in temporary API blocking.
5. Resource Dependencies: NodeBalancers require backend Linode instances or other network endpoints to function effectively. Ensure these are properly configured and accessible.
OUTPUT FORMATS
The Linode CLI offers flexible output formatting options using --json, --text, and --csv flags. This allows users to consume command output in a machine-readable format for scripting or a human-readable format for direct viewing. The --columns option provides further control over which data fields are displayed in text/CSV output.
AUTHENTICATION
The linode-cli authenticates requests to the Linode API using a personal access token. This token can be configured once using linode-cli configure or provided on a per-command basis using the global --token option. It is crucial to protect this token as it grants access to your Linode resources.
HISTORY
The linode-cli tool, which encompasses the nodebalancers subcommand, represents Linode's official open-source command-line interface for interacting with their cloud platform. Developed to provide a robust and scriptable alternative to the Linode Cloud Manager web interface, it has evolved significantly since its initial release. Its design emphasizes ease of use, automation, and integration into CI/CD pipelines. The nodebalancers module specifically emerged as Linode's NodeBalancer service matured, offering granular control over load balancing resources directly from the terminal, reflecting a broader industry trend towards 'infrastructure as code' and CLI-first management paradigms for cloud services.
SEE ALSO
linode-cli(1), linode-cli instances(1), linode-cli domains(1), linode-cli networking(1), curl(1), jq(1)