Skip to content

Commit

Permalink
add containerd config imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbaker1 committed Feb 21, 2024
1 parent a638baf commit 70bd0e1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions doc/usage/al2.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,28 @@ $ curl -sSL "http://localhost:8001/api/v1/nodes/ip-192-168-92-220.us-east-2.comp

---

## Customizing Containerd Config

The EKS defaults for `containerd` will be written to `/etc/containerd/config.toml`.
Additional configuration files placed in the `/etc/containerd/config.d/` directory will be imported and override defaults as described in the [`containerd` documentation](https://github.com/containerd/containerd/blob/release/1.7/docs/man/containerd-config.toml.5.md).

> **NOTE**: If you create an additional configuration file after `containerd`
> has already started (i.e. `bootstrap.sh` has already executed), you'll need to
> restart `containerd` to pick up the latest configuration.
> **CAUTION**: Making direct edits to the EKS default `containerd` configuration file is not recommended.
**View active containerd config**

To see the final configuration that is produced and consumed by containerd, you
can use the containerd cli:
```
$ containerd config dump
...
```

---

## Ephemeral Storage

Some instance types launch with ephemeral NVMe instance storage (i3, i4i, c5d, c6id, etc). There are two main ways of utilizing this storage within Kubernetes: a single RAID-0 array for use by kubelet and containerd or mounting the individual disks for pod usage.
Expand Down
1 change: 1 addition & 0 deletions templates/al2/provisioners/install-worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ sudo yum versionlock containerd-*
# install cri-tools for crictl, needed to interact with containerd's CRI server
sudo yum install -y cri-tools

sudo mkdir -p /etc/containerd/config.d
sudo mkdir -p /etc/eks/containerd
if [ -f "/etc/eks/containerd/containerd-config.toml" ]; then
## this means we are building a gpu ami and have already placed a containerd configuration file in /etc/eks
Expand Down
1 change: 1 addition & 0 deletions templates/al2/runtime/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ if [[ "$CONTAINER_RUNTIME" = "containerd" ]]; then
fi

sudo mkdir -p /etc/containerd
sudo mkdir -p /etc/containerd/config.d
sudo mkdir -p /etc/cni/net.d

if [[ -n "${CONTAINERD_CONFIG_FILE}" ]]; then
Expand Down
1 change: 1 addition & 0 deletions templates/al2/runtime/containerd-config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
imports = ["/etc/containerd/config.d/*.toml"]

[grpc]
address = "/run/containerd/containerd.sock"
Expand Down

0 comments on commit 70bd0e1

Please sign in to comment.