Fix crictl page

This PR fixes a link (at the bottom of the page) to reference.
It also fixes the indentation of the number lists, the incorrect syntax tag for code snippets.
This commit is contained in:
Qiming Teng
2022-02-05 12:50:41 +08:00
parent 6b6c7a2df8
commit 23286b6085
@@ -19,15 +19,14 @@ Kubernetes node. `crictl` and its source are hosted in the
## {{% heading "prerequisites" %}} ## {{% heading "prerequisites" %}}
`crictl` requires a Linux operating system with a CRI runtime. `crictl` requires a Linux operating system with a CRI runtime.
<!-- steps --> <!-- steps -->
## Installing crictl ## Installing crictl
You can download a compressed archive `crictl` from the cri-tools [release You can download a compressed archive `crictl` from the cri-tools
page](https://github.com/kubernetes-sigs/cri-tools/releases), for several [release page](https://github.com/kubernetes-sigs/cri-tools/releases), for several
different architectures. Download the version that corresponds to your version different architectures. Download the version that corresponds to your version
of Kubernetes. Extract it and move it to a location on your system path, such as of Kubernetes. Extract it and move it to a location on your system path, such as
`/usr/local/bin/`. `/usr/local/bin/`.
@@ -85,6 +84,7 @@ List all pods:
```shell ```shell
crictl pods crictl pods
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -100,6 +100,7 @@ List pods by name:
```shell ```shell
crictl pods --name nginx-65899c769f-wv2gp crictl pods --name nginx-65899c769f-wv2gp
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -112,6 +113,7 @@ List pods by label:
```shell ```shell
crictl pods --label run=nginx crictl pods --label run=nginx
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -126,6 +128,7 @@ List all images:
```shell ```shell
crictl images crictl images
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -141,6 +144,7 @@ List images by repository:
```shell ```shell
crictl images nginx crictl images nginx
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -153,6 +157,7 @@ Only list image IDs:
```shell ```shell
crictl images -q crictl images -q
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -169,6 +174,7 @@ List all containers:
```shell ```shell
crictl ps -a crictl ps -a
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -181,9 +187,10 @@ CONTAINER ID IMAGE
List running containers: List running containers:
``` ```shell
crictl ps crictl ps
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -198,6 +205,7 @@ CONTAINER ID IMAGE
```shell ```shell
crictl exec -i -t 1f73f2d81bf98 ls crictl exec -i -t 1f73f2d81bf98 ls
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -211,6 +219,7 @@ Get all container logs:
```shell ```shell
crictl logs 87d3992f84f74 crictl logs 87d3992f84f74
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -224,6 +233,7 @@ Get only the latest `N` lines of logs:
```shell ```shell
crictl logs --tail=1 87d3992f84f74 crictl logs --tail=1 87d3992f84f74
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -270,13 +280,16 @@ deleted by the Kubelet.
```shell ```shell
crictl pull busybox crictl pull busybox
```
```none
Image is up to date for busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df416dea4f41046e0f37d47 Image is up to date for busybox@sha256:141c253bc4c3fd0a201d32dc1f493bcf3fff003b6df416dea4f41046e0f37d47
``` ```
2. Create configs for the pod and the container: 2. Create configs for the pod and the container:
**Pod config**: **Pod config**:
```yaml
```json
{ {
"metadata": { "metadata": {
"name": "nginx-sandbox", "name": "nginx-sandbox",
@@ -291,7 +304,8 @@ deleted by the Kubelet.
``` ```
**Container config**: **Container config**:
```yaml
```json
{ {
"metadata": { "metadata": {
"name": "busybox" "name": "busybox"
@@ -322,6 +336,7 @@ deleted by the Kubelet.
```shell ```shell
crictl ps -a crictl ps -a
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -336,6 +351,7 @@ To start a container, pass its ID to `crictl start`:
```shell ```shell
crictl start 3e025dd50a72d956c4f14881fbb5b1080c9275674e95fb67f965f6478a957d60 crictl start 3e025dd50a72d956c4f14881fbb5b1080c9275674e95fb67f965f6478a957d60
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -357,6 +373,5 @@ CONTAINER ID IMAGE CREATED STATE
## {{% heading "whatsnext" %}} ## {{% heading "whatsnext" %}}
* [Learn more about `crictl`](https://github.com/kubernetes-sigs/cri-tools). * [Learn more about `crictl`](https://github.com/kubernetes-sigs/cri-tools).
* [Map `docker` CLI commands to `crictl`](/reference/tools/map-crictl-dockercli/). * [Map `docker` CLI commands to `crictl`](/docs/reference/tools/map-crictl-dockercli/).
<!-- discussion -->