Skip to content

Latest commit

 

History

History
54 lines (42 loc) · 1.23 KB

EXAMPLES_CRI.md

File metadata and controls

54 lines (42 loc) · 1.23 KB

Getting Started

Check Components

Before checkout the cri examples, make sure that you have built or installed the components described in overlaybd and BUILDING. You can check your overlaybd components as described in EXAMPLES.

Containerd config

Config the plugin cri for containerd. And make sure cri is not listed in disabled_plugins of containerd config file.

sudo cat <<-EOF | sudo tee --append /etc/containerd/config.toml

[plugins.cri]
    [plugins.cri.containerd]
        snapshotter = "overlaybd"
        disable_snapshot_annotations = false
EOF

Pod and container config

The example pod-config and container-config.

sudo cat <<-EOF | sudo tee pod-config.yaml
metadata:
  attempt: 1
  name: redis-obd
  namespace: default
log_directory: /tmp
linux:
  security_context:
    namespace_options:
      network: 2
EOF
sudo cat <<-EOF | sudo tee container-config.yaml
metadata:
  name: redis-obd-container
image:
  image: registry.hub.docker.com/overlaybd/redis:6.2.1_obd
log_path: redis.container.log
EOF

Create container by crictl

crictl run container-config.yaml pod-config.yaml