dtctl load-balancer create-listener
Usage
dtctl load-balancer create-listener [flags]
Aliases
cl
Description
Add a listener to a load balancer. A listener defines the protocol and port that the load balancer accepts front-end traffic on.
Example
# Add an HTTP listener on port 80
dtctl load-balancer create-listener --lb-id <lb-id> --protocol HTTP --port 80
Flags
| Option | Description |
|---|---|
--description, -d | Description of the load balancer listener |
--lb-id, -i | ID of the load balancer (required) |
--name, -n | Name of the load balancer listener |
--port, -p | Front-end port to listen on (1-65535) (required) |
--protocol, -r | Front-end protocol. One of: HTTP, HTTPS, TCP, UDP (required) |
Related Commands
| Command | Description |
|---|---|
| dtctl load-balancer update-listener | Update a listener |
| dtctl load-balancer delete-listener | Delete a listener |
| dtctl load-balancer listener-details | Show a listener |
| dtctl load-balancer listener-stats | Show listener statistics |
| dtctl load-balancer listeners | List listeners of a load balancer |
Global Flags
| Option | Description |
|---|---|
--api-url | Send this command to a different API endpoint, e.g. a test environment (default "https://console.dt.net.tr/api/v1") |
--config, -c | Specify a custom config file Default: ~/.config/dtctl/config.yaml |
--no-headers | Omit the column headers, for scripting Default: false |
--output, -o | Output format: text, wide, vertical, json. text fits the terminal, wide never truncates, vertical prints one field per line Default: text |