-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a mapping table from docker cli to crictl in crictl debugging doc #25109
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -356,4 +356,54 @@ CONTAINER ID IMAGE CREATED STATE | |
See [kubernetes-sigs/cri-tools](https://github.com/kubernetes-sigs/cri-tools) | ||
for more information. | ||
|
||
|
||
## Mapping from docker cli to crictl | ||
|
||
The exact versions for below mapping table are for docker cli v1.40 and crictl v1.19.0. Please note that the list is not exhaustive. For example, it doesn't include experimental commands of docker cli. | ||
|
||
Warn: the output format of CRICTL is similar to Docker CLI, despite some missing columns for some CLI. Make sure to check output for the specific command if your script output parsing. | ||
|
||
### Retrieve Debugging Information | ||
|
||
{{< table caption="mapping from docker cli to crictl - retrieve debugging information" >}} | ||
docker cli | crictl | Description | Unsupported Features | ||
-- | -- | -- | -- | ||
attach | attach | Attach to a running container | `--detach-keys`, `--sig-proxy` | ||
exec | exec | Run a command in a running container | `--privileged`, `--user`, `--detach-keys` | ||
images | images | List images | | ||
info | info | Display system-wide information | | ||
inspect | inspectinspecti | Return low-level information on a container, image or task | | ||
logs | logs | Fetch the logs of a container | `--details` | ||
ps | ps | List containers | | ||
stats | stats | Display a live stream of container(s) resource usage statistics | Column: NET/BLOCK I/O, PIDs | ||
version | version | Show the runtime (Docker, ContainerD, or others) version information | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aside: the first two columns could go in backticks There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. Let me update. |
||
{{< /table >}} | ||
|
||
### Perform Changes | ||
|
||
{{< table caption="mapping from docker cli to crictl - perform changes" >}} | ||
docker cli | crictl | Description | Unsupported Features | ||
-- | -- | -- | -- | ||
create | create | Create a new container | | ||
kill | stop (timeout = 0) | Kill one or more running container | `--signal` | ||
pull | pull | Pull an image or a repository from a registry | `--all-tags`, `--disable-content-trust` | ||
rm | rm | Remove one or more containers | | ||
rmi | rmi | Remove one or more images | | ||
run | run | Run a command in a new container | | ||
start | start | Start one or more stopped containers | `--detach-keys` | ||
stop | stop | Stop one or more running containers | | ||
update | update | Update configuration of one or more containers | `--restart`, `--blkio-weight` and some other resource limit not supported by CRI. | ||
{{< /table >}} | ||
|
||
### Supported only in crictl | ||
|
||
{{< table caption="mapping from docker cli to crictl - supported only in crictl" >}} | ||
crictl | Description | ||
-- | -- | ||
imagefsinfo | Return image filesystem info | ||
inspectp | Display the status of one or more pods | ||
port-forward | Forward local port to a pod | ||
pods | List pods | ||
runp | Run a new pod | ||
rmp | Remove one or more pods | ||
stopp | Stop one or more running pods | ||
{{< /table >}} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh actually, is
inspectinspecti
a bug?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, missed a separator. Let me fix