mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
commit
ccc8bc8289
@ -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
|
||||
|
BIN
contrib/podex/podex
Executable file
BIN
contrib/podex/podex
Executable file
Binary file not shown.
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user