跳到內容

get

Usage

rapd target 命令用來讀取Target資源。

Terminal window
rapd target get (Name...) [flags]

Flags

這些是 rapd target get 命令中可用的旗標:

Flag NameShort NameDefault ValueRequiredDescription
--output-oNo輸出資源完整spec成可讀的文件,如: yaml, jsonl格式。
--label-lNo讀取label匹配的資源
--fieldNo讀取field匹配的資源
--all-namespaces-ANo查詢所有環境的資源
--ignore-not-foundNo當資源不存在會忽略錯誤(return exit code 0)

Examples

這些是一些 rapd target get 命令的使用範例:

  1. 讀取指定名稱的Target(default-env 環境):
Terminal window
rapd target get bind-gcp -e default-env
  1. 輸出Target 完整Spec:
Terminal window
rapd target get bind-gcp -e default-env -o yaml

Output

成功執行命令後,會返回類似以下的輸出:

Terminal window
NAMESPACE NAME PHASE CLUSTERNAME
test bind-gcp Bound default
test bind-aws Unbound