Skip to content

lb

ロードバランサー (Octavia 互換) を管理するコマンドグループです。LB 本体 + listener + pool + member + health monitor の 5 階層で構成されます。

create コマンドは --waitprovisioning_statusACTIVE になるまで待機できます。ERROR ステータスを検知するとエラー終了します。

lb

list

LB 一覧を表示します (ID / Name / provisioning_status / vip_address)。

bash
conoha lb list

show

LB の詳細を表示します。

bash
conoha lb show <id>

create

LB を新規作成します。

bash
conoha lb create --name <name> --subnet-id <id>
オプション説明
--nameLB 名(必須
--subnet-idVIP のサブネット ID(必須

delete

LB を削除します (確認プロンプトあり)。

bash
conoha lb delete <id>

lb listener

LB に紐づく listener (受信ポート) を管理します。

list / show

bash
conoha lb listener list
conoha lb listener show <id>

create

bash
conoha lb listener create --name <name> --protocol <proto> --port <n> --lb-id <id>
オプション説明
--namelistener 名(必須
--protocolプロトコル: TCP / UDP必須
--portポート番号(必須
--lb-idLB ID(必須
--wait / --wait-timeoutACTIVE になるまで待機

delete

bash
conoha lb listener delete <id>

lb pool

listener にトラフィックを振り分けるバックエンド pool を管理します。

list / show

bash
conoha lb pool list
conoha lb pool show <id>

create

bash
conoha lb pool create \
  --name <name> --protocol <proto> \
  --lb-algorithm <algo> --listener-id <id>
オプション説明
--namepool 名(必須
--protocolプロトコル: TCP / UDP必須
--lb-algorithmアルゴリズム: ROUND_ROBIN / LEAST_CONNECTIONS必須
--listener-idlistener ID(必須
--wait / --wait-timeoutACTIVE になるまで待機

delete

bash
conoha lb pool delete <id>

lb member

pool に登録されるバックエンドサーバー (member) を管理します。

list / show

bash
conoha lb member list --pool-id <id>
conoha lb member show <id> --pool-id <id>
オプション説明
--pool-id対象 pool の ID(必須

create

bash
conoha lb member create \
  --name <name> --address <ip> --port <n> --pool-id <id> [--weight <n>]
オプション説明
--namemember 名(必須
--addressバックエンド IP アドレス(必須
--portバックエンドポート(必須
--pool-idpool ID(必須
--weight負荷分散重み(デフォルト: 1
--wait / --wait-timeoutACTIVE になるまで待機

delete

bash
conoha lb member delete <id> --pool-id <id>

lb healthmonitor

pool 配下の member の死活監視を行う health monitor を管理します。

list / show

bash
conoha lb healthmonitor list
conoha lb healthmonitor show <id>

create

bash
conoha lb healthmonitor create \
  --name <name> --pool-id <id> --type <type> \
  --delay <sec> --timeout <sec> --max-retries <n> \
  [--url-path <path>] [--expected-codes <codes>]
オプション説明
--namehealth monitor 名(必須
--pool-idpool ID(必須
--type監視種別: TCP / HTTP / HTTPS / PING / UDP-CONNECT必須
--delayチェック間隔(秒、必須
--timeoutチェックタイムアウト(秒、必須
--max-retries失敗判定までのリトライ数(必須
--url-pathHTTP 監視時のパス
--expected-codes正常とみなす HTTP ステータス(例: 200 / 200-299
--wait / --wait-timeoutACTIVE になるまで待機

delete

bash
conoha lb healthmonitor delete <id>