diff --git a/contrib/podex/README.md b/contrib/podex/README.md index c7ae30f7415..04265b13fa6 100644 --- a/contrib/podex/README.md +++ b/contrib/podex/README.md @@ -8,9 +8,21 @@ Manifests can then be edited by a human to match deployment needs. ## Usage ``` -$ docker pull google/nodejs-hello -$ podex -yaml google/nodejs-hello > pod.yaml -$ podex -json google/nodejs-hello > pod.json +$ podex [-json|-yaml] [-id PODNAME] IMAGES... + +$ podex -json [-id PODNAME] IMAGES... > pod.json +$ podex -yaml [-id PODNAME] IMAGES... > pod.yaml +``` + +### Options +- `id`: set the pod name (required with multiple images, optional with single image: default to image base name) +- `json`: puts the container manifest into JSON format +- `yaml`: puts the container manifest into YAML format + +### Examples +``` +$ podex -json google/nodejs-hello > pod.yaml +$ podex -yaml -id nodejs-nginx google/nodejs-hello nginx > pod.yaml ``` ## TODOs diff --git a/contrib/podex/podex b/contrib/podex/podex new file mode 100755 index 00000000000..5e216f5be4e Binary files /dev/null and b/contrib/podex/podex differ diff --git a/contrib/podex/podex.go b/contrib/podex/podex.go index 97833e17ccf..806927c3584 100644 --- a/contrib/podex/podex.go +++ b/contrib/podex/podex.go @@ -40,7 +40,7 @@ import ( "gopkg.in/v1/yaml" ) -const usage = "usage: podex [-json|-yaml] -id=ID username/image1 ... username/imageN" +const usage = "usage: podex [-json|-yaml] [-id PODNAME] IMAGES" var generateJSON = flag.Bool("json", false, "generate json manifest") var generateYAML = flag.Bool("yaml", false, "generate yaml manifest")