diff --git a/cmd/crictl/container.go b/cmd/crictl/container.go index b054c6b526..c2a8be17fa 100644 --- a/cmd/crictl/container.go +++ b/cmd/crictl/container.go @@ -53,7 +53,7 @@ type createOptions struct { var createContainerCommand = cli.Command{ Name: "create", Usage: "Create a new container", - ArgsUsage: "SANDBOX container-config.[json|yaml] sandbox-config.[json|yaml]", + ArgsUsage: "PODSANDBOX container-config.[json|yaml] podsandbox-config.[json|yaml]", Flags: []cli.Flag{}, Action: func(context *cli.Context) error { if len(context.Args()) != 3 { @@ -259,9 +259,9 @@ var listContainersCommand = cli.Command{ Usage: "Filter by container id", }, cli.StringFlag{ - Name: "sandbox", + Name: "podsandbox, p", Value: "", - Usage: "Filter by sandbox id", + Usage: "Filter by pod sandbox id", }, cli.StringFlag{ Name: "state", @@ -305,7 +305,7 @@ var listContainersCommand = cli.Command{ opts := listOptions{ id: context.String("id"), - podID: context.String("sandbox"), + podID: context.String("podsandbox"), state: context.String("state"), verbose: context.Bool("verbose"), quiet: context.Bool("quiet"), @@ -622,7 +622,7 @@ func ListContainers(client pb.RuntimeServiceClient, opts listOptions) error { } fmt.Printf("ID: %s\n", c.Id) - fmt.Printf("SandboxID: %s\n", c.PodSandboxId) + fmt.Printf("PodSandboxID: %s\n", c.PodSandboxId) if c.Metadata != nil { if c.Metadata.Name != "" { fmt.Printf("Name: %s\n", c.Metadata.Name) diff --git a/cmd/crictl/portforward.go b/cmd/crictl/portforward.go index dd1b6d98e0..7e738c7e15 100644 --- a/cmd/crictl/portforward.go +++ b/cmd/crictl/portforward.go @@ -35,8 +35,8 @@ import ( var runtimePortForwardCommand = cli.Command{ Name: "port-forward", - Usage: "Forward local port to a sandbox", - ArgsUsage: "SANDBOX [LOCAL_PORT:]REMOTE_PORT", + Usage: "Forward local port to a pod sandbox", + ArgsUsage: "PODSANDBOX [LOCAL_PORT:]REMOTE_PORT", Action: func(context *cli.Context) error { args := context.Args() if len(args) < 2 { diff --git a/cmd/crictl/sandbox.go b/cmd/crictl/sandbox.go index 30f1551923..da4c83ae93 100644 --- a/cmd/crictl/sandbox.go +++ b/cmd/crictl/sandbox.go @@ -43,9 +43,9 @@ func (a sandboxByCreated) Less(i, j int) bool { } var runPodSandboxCommand = cli.Command{ - Name: "runs", - Usage: "Run a new sandbox", - ArgsUsage: "sandbox-config.[json|yaml]", + Name: "runp", + Usage: "Run a new pod sandbox", + ArgsUsage: "podsandbox-config.[json|yaml]", Action: func(context *cli.Context) error { sandboxSpec := context.Args().First() if sandboxSpec == "" { @@ -71,9 +71,9 @@ var runPodSandboxCommand = cli.Command{ } var stopPodSandboxCommand = cli.Command{ - Name: "stops", - Usage: "Stop a running sandbox", - ArgsUsage: "SANDBOX", + Name: "stopp", + Usage: "Stop a running pod sandbox", + ArgsUsage: "PODSANDBOX", Action: func(context *cli.Context) error { id := context.Args().First() if id == "" { @@ -93,9 +93,9 @@ var stopPodSandboxCommand = cli.Command{ } var removePodSandboxCommand = cli.Command{ - Name: "rms", - Usage: "Remove a sandbox", - ArgsUsage: "SANDBOX", + Name: "rmp", + Usage: "Remove a pod sandbox", + ArgsUsage: "PODSANDBOX", Action: func(context *cli.Context) error { id := context.Args().First() if id == "" { @@ -115,9 +115,9 @@ var removePodSandboxCommand = cli.Command{ } var podSandboxStatusCommand = cli.Command{ - Name: "inspects", - Usage: "Display the status of a sandbox", - ArgsUsage: "SANDBOX", + Name: "inspectp", + Usage: "Display the status of a pod sandbox", + ArgsUsage: "PODSANDBOX", Flags: []cli.Flag{ cli.StringFlag{ Name: "output, o", @@ -147,8 +147,8 @@ var podSandboxStatusCommand = cli.Command{ } var listPodSandboxCommand = cli.Command{ - Name: "sandboxes", - Usage: "List sandboxes", + Name: "pods", + Usage: "List pod sandboxes", Flags: []cli.Flag{ cli.StringFlag{ Name: "id", @@ -176,11 +176,11 @@ var listPodSandboxCommand = cli.Command{ }, cli.BoolFlag{ Name: "verbose, v", - Usage: "show verbose info for sandboxes", + Usage: "show verbose info for pod sandboxes", }, cli.BoolFlag{ Name: "quiet, q", - Usage: "list only sandbox IDs", + Usage: "list only pod sandbox IDs", }, cli.StringFlag{ Name: "output, o", @@ -188,11 +188,11 @@ var listPodSandboxCommand = cli.Command{ }, cli.BoolFlag{ Name: "latest, l", - Usage: "Show recently created sandboxes", + Usage: "Show recently created pod sandboxes", }, cli.IntFlag{ Name: "last, n", - Usage: "Show last n recently created sandboxes", + Usage: "Show last n recently created pod sandboxes", }, cli.BoolFlag{ Name: "no-trunc", @@ -416,7 +416,7 @@ func ListPodSandboxes(client pb.RuntimeServiceClient, opts listOptions) error { w := tabwriter.NewWriter(os.Stdout, 20, 1, 3, ' ', 0) if !opts.verbose && !opts.quiet { - fmt.Fprintln(w, "SANDBOX ID\tCREATED\tSTATE\tNAME\tNAMESPACE\tATTEMPT") + fmt.Fprintln(w, "PODSANDBOX ID\tCREATED\tSTATE\tNAME\tNAMESPACE\tATTEMPT") } for _, pod := range r.Items { if opts.quiet { diff --git a/cmd/crictl/stats.go b/cmd/crictl/stats.go index 3110b8f019..632e423fcc 100644 --- a/cmd/crictl/stats.go +++ b/cmd/crictl/stats.go @@ -61,9 +61,9 @@ var statsCommand = cli.Command{ Usage: "Filter by container id", }, cli.StringFlag{ - Name: "sandbox", + Name: "podsandbox, p", Value: "", - Usage: "Filter by sandbox id", + Usage: "Filter by pod sandbox id", }, cli.StringSliceFlag{ Name: "label", @@ -88,7 +88,7 @@ var statsCommand = cli.Command{ opts := statsOptions{ all: context.Bool("all"), id: context.String("id"), - podID: context.String("sandbox"), + podID: context.String("podsandbox"), sample: time.Duration(context.Int("seconds")) * time.Second, output: context.String("output"), } diff --git a/docs/crictl.md b/docs/crictl.md index 07c37334ba..4174399f47 100644 --- a/docs/crictl.md +++ b/docs/crictl.md @@ -25,11 +25,11 @@ crictl SUBCOMMAND [FLAGS] Subcommands includes: - `info`: Display runtime version information -- `runs`: Run a new sandbox -- `stops`: Stop a running sandbox -- `rms`: Remove a sandbox -- `inspects`: Display the status of a sandbox -- `sandboxes`: List sandboxes +- `runp`: Run a new pod sandbox +- `stopp`: Stop a running pod sandbox +- `rmp`: Remove a pod sandbox +- `inspectp`: Display the status of a pod sandbox +- `pods`: List pod sandboxes - `create`: Create a new container - `start`: Start a created container - `stop`: Stop a running container @@ -43,7 +43,7 @@ Subcommands includes: - `inspecti`: Return the status of an image - `rmi`: Remove an image - `exec`: Run a command in a running container -- `port-forward`: Forward local port to a sandbox +- `port-forward`: Forward local port to a pod sandbox - `logs`: Fetch the logs of a container - `help`: Shows a list of commands or help for one command @@ -73,10 +73,10 @@ debug: true ## Examples -### Run sandbox with config file +### Run pod sandbox with config file ``` -# cat sandbox-config.json +# cat podsandbox-config.json { "metadata": { "name": "nginx-sandbox", @@ -88,10 +88,10 @@ debug: true } } -# crictl runs sandbox-config.json +# crictl runp podsandbox-config.json e1c83b0b8d481d4af8ba98d5f7812577fc175a37b10dc824335951f52addbb4e -# crictl sandboxes -SANDBOX ID NAME STATE +# crictl pods +PODSANDBOX ID NAME STATE e1c83b0b8d481d4af8ba98d5f7812577fc175a37b10dc824335951f52addbb4e nginx-sandbox SANDBOX_READY ``` @@ -106,10 +106,10 @@ busybox latest d20ae45477cbc 1 gcr.io/google_containers/pause-amd64 3.0 99e59f495ffaa 747kB ``` -### Create container in a sandbox with config file +### Create container in a pod sandbox with config file ``` -# cat sandbox-config.json +# cat podsandbox-config.json { "metadata": { "name": "nginx-sandbox", @@ -136,7 +136,7 @@ gcr.io/google_containers/pause-amd64 3.0 99e59f495ffaa 7 } } -# crictl create e1c83b0b8d481d4af8ba98d5f7812577fc175a37b10dc824335951f52addbb4e container-config.json sandbox-config.json +# crictl create e1c83b0b8d481d4af8ba98d5f7812577fc175a37b10dc824335951f52addbb4e container-config.json podsandbox-config.json 0a2c761303163f2acaaeaee07d2ba143ee4cea7e3bde3d32190e2a36525c8a05 # crictl ps CONTAINER ID CREATED STATE NAME diff --git a/docs/examples/sandbox-config.json b/docs/examples/podsandbox-config.json similarity index 100% rename from docs/examples/sandbox-config.json rename to docs/examples/podsandbox-config.json diff --git a/docs/examples/sandbox-config.yaml b/docs/examples/podsandbox-config.yaml similarity index 100% rename from docs/examples/sandbox-config.yaml rename to docs/examples/podsandbox-config.yaml