Skip to content

Commit bfb29f2

Browse files
authored
Merge pull request #1132 from kiela/patch-1
Improve text formatting
2 parents 73472f1 + 0497653 commit bfb29f2

File tree

1 file changed

+34
-31
lines changed

1 file changed

+34
-31
lines changed

docs/crictl.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Container Runtime Interface (CRI) CLI
22

3-
crictl provides a CLI for CRI-compatible container runtimes. This allows the CRI runtime developers to debug their runtime without needing to set up Kubernetes components.
3+
`crictl` provides a CLI for CRI-compatible container runtimes. This allows the CRI runtime developers to debug their runtime without needing to set up Kubernetes components.
44

5-
crictl is currently in Beta and still under quick iterations. It is hosted at the [cri-tools](https://github.com/kubernetes-sigs/cri-tools) repository. We encourage the CRI developers to report bugs or help extend the coverage by adding more functionalities.
5+
`crictl` is currently in Beta and still under quick iterations. It is hosted at the [cri-tools](https://github.com/kubernetes-sigs/cri-tools) repository. We encourage the CRI developers to report bugs or help extend the coverage by adding more functionalities.
66

77
## Install crictl
88

@@ -31,7 +31,7 @@ rm -f crictl-$VERSION-linux-amd64.tar.gz
3131
## Usage
3232

3333
```sh
34-
crictl [global options] command [command options] [arguments...]
34+
crictl [global options] command [command options] [arguments...]
3535
```
3636

3737
COMMANDS:
@@ -60,14 +60,14 @@ COMMANDS:
6060
- `stop`: Stop one or more running containers
6161
- `stopp`: Stop one or more running pods
6262
- `update`: Update one or more running containers
63-
- `config`: Get and set crictl client configuration options
63+
- `config`: Get and set `crictl` client configuration options
6464
- `stats`: List container(s) resource usage statistics
6565
- `statsp`: List pod(s) resource usage statistics
6666
- `completion`: Output bash shell completion code
6767
- `checkpoint`: Checkpoint one or more running containers
6868
- `help, h`: Shows a list of commands or help for one command
6969

70-
crictl by default connects on Unix to:
70+
`crictl` by default connects on Unix to:
7171

7272
- `unix:///var/run/dockershim.sock` or
7373
- `unix:///run/containerd/containerd.sock` or
@@ -136,46 +136,49 @@ via sudo (`sudo -E crictl ...`).
136136

137137
## Additional options
138138

139-
- `--timeout`, `-t`: Timeout of connecting to server in seconds (default: 2s).
139+
- `--timeout`, `-t`: Timeout of connecting to server in seconds (default: `2s`).
140140
0 or less is interpreted as unset and converted to the default. There is no
141141
option for no timeout value set and the smallest supported timeout is `1s`
142142
- `--debug`, `-D`: Enable debug output
143143
- `--help`, `-h`: show help
144-
- `--version`, `-v`: print the version information of crictl
145-
- `--config`, `-c`: Location of the client config file. If not specified and the default does not exist, the program's directory is searched as well (default: "/etc/crictl.yaml") [$CRI_CONFIG_FILE]
144+
- `--version`, `-v`: print the version information of `crictl`
145+
- `--config`, `-c`: Location of the client config file (default: `/etc/crictl.yaml`). Can be changed by setting `CRI_CONFIG_FILE` environment variable. If not specified and the default does not exist, the program's directory is searched as well
146146

147147
## Client Configuration Options
148-
Use the crictl config command to get and set the crictl client configuration
148+
149+
Use the `crictl` config command to get and set the `crictl` client configuration
149150
options.
150-
```
151+
151152
USAGE:
152-
crictl config [command options] [<crictl options>]
153-
```
154-
For example `crictl config --set debug=true` will enable debug mode when giving subsequent crictl commands.
155153

156-
CRICTL OPTIONS:
154+
```sh
155+
crictl config [command options] [<crictl options>]
157156
```
158-
runtime-endpoint: Container runtime endpoint
159-
image-endpoint: Image endpoint
160-
timeout: Timeout of connecting to server (default: 2s)
161-
debug: Enable debug output (default: false)
162-
pull-image-on-create: Enable pulling image on create requests (default: false)
163-
disable-pull-on-run: Disable pulling image on run requests (default: false)
164157

165-
```
166-
OPTIONS:
167-
```
168-
--get value show the option value
169-
--set value set option (can specify multiple or separate values with commas: opt1=val1,opt2=val2)
170-
--help, -h show help (default: false)
171-
```
158+
For example `crictl config --set debug=true` will enable debug mode when giving subsequent `crictl` commands.
159+
160+
COMMAND OPTIONS:
161+
162+
- `--get value`: Show the option value
163+
- `--set value`: Set option (can specify multiple or separate values with commas: opt1=val1,opt2=val2)
164+
- `--help`, `-h`: Show help (default: `false`)
165+
166+
`crictl` OPTIONS:
167+
168+
- `runtime-endpoint`: Container runtime endpoint (no default value)
169+
- `image-endpoint`: Image endpoint (no default value)
170+
- `timeout`: Timeout of connecting to server (default: `2s`)
171+
- `debug`: Enable debug output (default: `false`)
172+
- `pull-image-on-create`: Enable pulling image on create requests (default: `false`)
173+
- `disable-pull-on-run`: Disable pulling image on run requests (default: `false`)
174+
172175
> When enabled `pull-image-on-create` modifies the create container command to first pull the container's image.
173176
This feature is used as a helper to make creating containers easier and faster.
174177
Some users of `crictl` may desire to not pull the image necessary to create the container.
175-
For example, the image may have already been pulled or otherwise loaded into the container runtime, or the user may be running without a network. For this reason the default for `pull-image-on-create` is false.
178+
For example, the image may have already been pulled or otherwise loaded into the container runtime, or the user may be running without a network. For this reason the default for `pull-image-on-create` is `false`.
176179

177-
> By default the run command first pulls the container image, and `disable-pull-on-run` is false.
178-
Some users of `crictl` may desire to set `disable-pull-on-run` to true to not pull the image by default when using the run command.
180+
> By default the run command first pulls the container image, and `disable-pull-on-run` is `false`.
181+
Some users of `crictl` may desire to set `disable-pull-on-run` to `true` to not pull the image by default when using the run command.
179182

180183
> To override these default pull configuration settings, `--no-pull` and `--with-pull` options are provided for the create and run commands.
181184
@@ -209,7 +212,7 @@ POD ID CREATED STATE NAME
209212
f84dd361f8dc5 17 seconds ago Ready nginx-sandbox default 1
210213
```
211214

212-
#### Run pod sandbox with runtime handler
215+
### Run pod sandbox with runtime handler
213216

214217
Runtime handler requires runtime support. The following example shows running a pod sandbox with `runsc` handler on containerd runtime.
215218

0 commit comments

Comments
 (0)