# cri-o Usage Transfer

This document outlines useful information for ops and dev transfer as it relates to infrastructure that utilizes cri-o.

## Operational Transfer

## Abstract

The `crio` daemon is intended to provide the [CRI](https://github.com/kubernetes/community/blob/master/contributors/devel/container-runtime-interface.md) socket needed for Kubernetes to use for automating deployment, scaling, and management of containerized applications (See the document for [configuring kubernetes to use cri-o](./kubernetes.md) for more information on that).
Therefore the `crioctl` command line is a client that interfaces to the same grpc socket as the kubernetes daemon would, for talking to the `crio` daemon.
In many ways `crioctl` is only as feature rich as the Kubernetes CRI requires.
There are additional tools e.g. `kpod` and [`buildah`](https://github.com/projectatomic/buildah) that provide a feature rich set of commands for all operational needs in a Kubernetes environment.


## System Tools

Many traditional tools will still be useful, such as `pstree`, `nsenter` and `lsns`.
As well as some systemd helpers like `systemd-cgls` and `systemd-cgtop` are still just as applicable.

## Equivalents

For many troubleshooting and information collection steps, there may be an existing pattern.
Following provides equivalent with cri-o tools for gathering information or jumping into containers, for operational use.

| Existing Step | CRI-O (and friends) |
| :---: | :---: |
| `docker info` | [`kpod info`](./docs/kpod-info.2.md) |
| `docker inspect` | [`kpod inspect`]() (TBD) |
| `docker stats` | [`crioctl ctr status`]() (TBD) |
| `docker exec` | [`crioctl ctr exec`](./docs/crio.8.md) |
| `docker ps` | [`crioctl ctr list`](./docs/crio.8.md) or [`runc list`](https://github.com/opencontainers/runc/blob/master/man/runc-list.8.md) |
| `docker logs` | [`kpod ...`]() (TBD) or `journalctl ...` |

If you were already using steps like `kubectl exec` (or `oc exec` on OpenShift), they will continue to function the same way.

## Development Transfer

There are other equivalents for these tools

| Existing Step | CRI-O (and friends) |
| :---: | :---: |
| `docker images` | [`kpod images`](./docs/kpod-images.1.md) |
| `docker rmi` | [`kpod rmi`](./docs/kpod-rmi.1.md) |
| `docker tag` | [`kpod tag`](./docs/kpod-tag.1.md) |
| `docker pull` | [`kpod pull`](./docs/kpod-pull.1.md) |
| `docker load` | [`kpod load`](TBD) |
| `docker save` | [`kpod save`](TBD) |
| `docker build` | [`buildah bud`](https://github.com/projectatomic/buildah/blob/master/docs/buildah-bud.md) |
| `docker push` | [`buildah push`](https://github.com/projectatomic/buildah/blob/master/docs/buildah-push.md) |
