Skip to content

Commit

Permalink
add user-guide
Browse files Browse the repository at this point in the history
  • Loading branch information
bwagner5 committed Mar 31, 2023
1 parent 9810225 commit 627ca58
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions doc/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This document includes details about using the AMI template and the resulting AM
1. [AL2 and Linux kernel information](#al2-and-linux-kernel-information)
1. [Updating known instance types](#updating-known-instance-types)
1. [Version-locked packages](#version-locked-packages)
1. [Ephemeral Storage](#ephemeral-storage)

---

Expand Down Expand Up @@ -309,3 +310,19 @@ sudo yum versionlock delete $PACKAGE_NAME
# unlock all packages
sudo yum versionlock clear
```

## 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.

The EKS Optimized AMI includes a utility script to configure ephemeral storage. The script can be invoked by passing the `--local-disks <raid0 | mount>` flag to the `/etc/eks/bootstrap.sh` script or the script can be invoked directly at `/bin/setup-local-disks`. All disks are formatted with an XFS file system.

Below are details on the two disk setup options:

### RAID-0 for Kubelet and Containerd (raid0)

A RAID-0 array is setup that includes all ephemeral NVMe instance storage disks. The containerd and kubelet state directories (`/var/lib/containerd` and `/var/lib/kubelet`) will then use the ephemeral storage for more and faster node ephemeral-storage. The node's ephemeral storage can be shared among pods that request ephemeral storage and container images that are downloaded to the node.

### Mount for Persistent Volumes (mount)

Another way of utilizing the ephemeral disks is to format and mount the individual disks. Mounting individual disks allows the [local-static-provisioner](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner) DaemonSet to creates Persistent Volume Claims that pods can utilize.
4 changes: 2 additions & 2 deletions files/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ while [[ $# -gt 0 ]]; do
shift
shift
;;
--raid-local-disks)
RAID_LOCAL_DISKS=$2
--local-disks)
LOCAL_DISKS=$2
shift
shift
;;
Expand Down

0 comments on commit 627ca58

Please sign in to comment.