Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Simplify crictl CLI #123

Merged
merged 4 commits into from
Aug 24, 2017
Merged

Simplify crictl CLI #123

merged 4 commits into from
Aug 24, 2017

Conversation

feiskyer
Copy link
Member

This PR simplifies crictl CLI via

  • move subcommands of sandbox/image/container directly to crictl subcommands
  • make default output more human readable, e.g. format timestamp and size
  • add output format of yaml and json
# crictl --help
NAME:
   crictl - client for CRI

USAGE:
   crictl [global options] command [command options] [arguments...]

VERSION:
   0.1.0

COMMANDS:
     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
     create        Create a new container
     start         Start a stopped container
     stop          Stop a running container
     rm            Remove a container
     inspect       Display the status of a container
     ps            List containers
     status        Display status of the container runtime
     attach        Attach to a running container
     pull          Pull an image from a registry
     images        List images
     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
     logs          Fetch the logs of a container
     help, h       Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --config value, -c value            Location of the client config file [$CRI_CONFIG_FILE]
   --runtime-endpoint value, -r value  Endpoint of CRI container runtime service (default: "/var/run/dockershim.sock") [$CRI_RUNTIME_ENDPOINT]
   --image-endpoint value, -i value    Endpoint of CRI image manager service [$CRI_IMAGE_ENDPOINT]
   --timeout value, -t value           Timeout of connecting to the server (default: 10s)
   --debug, -D                         Enable debug mode
   --help, -h                          show help
   --version, -v                       print the version

See more usage at docs/crictl.md.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 24, 2017
@feiskyer feiskyer changed the title Crictl Simplify crictl CLI Aug 24, 2017
@feiskyer
Copy link
Member Author

/cc @Random-Liu @heartlock

@heartlock
Copy link
Contributor

/lgtm

@feiskyer feiskyer requested review from mrunalp and runcom August 24, 2017 06:53
@xlgao-zju
Copy link
Contributor

cool! LGTM

@xlgao-zju xlgao-zju merged commit 26a7a4f into kubernetes-sigs:master Aug 24, 2017
@feiskyer feiskyer deleted the crictl branch August 24, 2017 07:28
@runcom
Copy link
Contributor

runcom commented Aug 27, 2017

This is all but simplifying :(

@runcom
Copy link
Contributor

runcom commented Aug 27, 2017

@feiskyer can you at least tag a new version of cri-tools?

@feiskyer
Copy link
Member Author

@runcom yep, of course, will release later together with kubernetes v1.8

@feiskyer feiskyer mentioned this pull request Sep 22, 2017
3 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants