Usage Instructions
Start a Kuasar sandbox.
Ensure that Kuasar and related components have been correctly installed and configured.
Prepare the service container image. Assume that the container image is busybox. Use the iSula container engine to download the container image.
isula pull busybox
Prepare the YAML files for the pod and container. The file examples are as follows:
$ cat podsandbox.yaml metadata: name: busybox-sandbox namespace: default uid: hdishd83djaidwnduwk28bcsc log_directory: /tmp linux: namespaces: options: {} $ cat pod-container.yaml metadata: name: busybox image: image: docker.io/library/busybox:latest command: - top log_path: busybox.log
Start a pod.
$ crictl runp --runtime=vmm podsandbox.yaml 5cbcf744949d8500e7159d6bd1e3894211f475549c0be15d9c60d3c502c7ede3
Check the pod list. The pod is in the Ready state.
$ crictl pods POD ID CREATED STATE NAME NAMESPACE ATTEMPT 5cbcf744949d8 About a minute ago Ready busybox-sandbox default 1
Create a service container in the pod.
$ crictl create 5cbcf744949d8500e7159d6bd1e3894211f475549c0be15d9c60d3c502c7ede3 pod-container.yaml podsandbox.yaml c11df540f913e57d1e28372334c028fd6550a2ba73208a3991fbcdb421804a50
View the container list. The container is in the Created state.
$ crictl ps -a CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID c11df540f913e docker.io/library/busybox:latest 15 seconds ago Created busybox 0 5cbcf744949d
Start the service container.
crictl start c11df540f913e57d1e28372334c028fd6550a2ba73208a3991fbcdb421804a50
Check the container list. The container is in the Running state.
$ crictl ps CONTAINER IMAGE CREATED STATE NAME ATTEMPT POD ID c11df540f913e docker.io/library/busybox:latest 2 minutes ago Running busybox 0 5cbcf744949d8
NOTE: You can also run a
crictl run
command to start a pod with a service container.$ crictl run -r vmm --no-pull container-config.yaml podsandbox-config.yaml
Stop and delete the container and the pod.
crictl rm -f c11df540f913e crictl rmp -f 5cbcf744949d8