Skip to content
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

Allow containerd config imports #1630

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading