kf create-service

名稱

kf create-service - 使用市集範本建立服務執行個體。

概要

kf create-service SERVICE PLAN SERVICE_INSTANCE [-c PARAMETERS_AS_JSON] [-b service-broker] [-t TAGS] [flags]

說明

Create service 會使用市集中的範本建立新的 ServiceInstance。

範例

# Creates a new instance of a db-service with the name mydb, plan silver, and provisioning configuration
kf create-service db-service silver mydb -c '{"ram_gb":4}'

# Creates a new instance of a db-service from the broker named local-broker
kf create-service db-service silver mydb -c ~/workspace/tmp/instance_config.json -b local-broker

# Creates a new instance of a db-service with the name mydb and override tags
kf create-service db-service silver mydb -t "list, of, tags"

旗標

--async

請勿等待伺服器上的動作完成,再傳回結果。

-b, --broker=string

將建立執行個體的服務仲介名稱。

-h, --help

create-service 的說明

-c, --parameters=string

JSON 物件或包含設定參數的 JSON 檔案路徑。(預設為「{}」)

-t, --tags=string

使用者定義的標記,可用於在注入期間區分服務。

--timeout=duration

等待作業完成的時間長度。有效的單位為「s」、「m」、「h」。(預設為 30m0s)

繼承的標記

這些標記會繼承自父項指令。

--as=string

要冒用來執行作業的使用者名稱。

--as-group=strings

要冒用身分的群組。如要指定多個群組,請多次加入這個標記。

--config=string

用於 CLI 要求的 Kf 設定檔路徑。

--kubeconfig=string

用於 CLI 要求的 kubeconfig 檔案路徑。

--log-http

將 HTTP 要求記錄到標準錯誤。

--space=string

要執行指令的空間。這個標記會覆寫目前指定的空間。