Skip to content

Commit

Permalink
docs/rootless: use Bottlerocket's API configurations
Browse files Browse the repository at this point in the history
Bottlerocket favors API configurations instead of manual calls to
configure sysctl knobs

Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
  • Loading branch information
arnaldo2792 committed Sep 26, 2023
1 parent deba876 commit bb2f10d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/rootless.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ See also the [example manifests](#Kubernetes).
### Bottlerocket OS
Needs to run `sysctl -w user.max_user_namespaces=N` (N=positive integer, like 63359) on the host nodes.
Needs to set the max user namespaces to a positive integer, through the [API settings](https://github.com/bottlerocket-os/bottlerocket#kernel-settings):
See [`../examples/kubernetes/sysctl-userns.privileged.yaml`](../examples/kubernetes/sysctl-userns.privileged.yaml).
```toml
[settings.kernel.sysctl]
"user.max_user_namespaces" = "16384"
```

See [`../examples/eksctl/bottlerocket.yaml`](../examples/eskctl/bottlerocket.yaml) for an example to configure a Node Group in EKS.

<details>
<summary>Old distributions</summary>
Expand Down
25 changes: 25 additions & 0 deletions examples/eksctl/bottlerocket.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig

metadata:
name: bottlerocket
region: us-west-2
version: '1.27'

nodeGroups:
- name: buildkit
desiredCapacity: 1
amiFamily: Bottlerocket
iam:
attachPolicyARNs:
- arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy
- arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy
- arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
- arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
bottlerocket:
settings:
kernel:
sysctl:
# Adjust the value as needed
"user.max_user_namespace": "16384"

0 comments on commit bb2f10d

Please sign in to comment.