Skip to content

Commit 456094d

Browse files
committed
add launch_template usage docs
1 parent 51c0e62 commit 456094d

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

docs/docs/explanations/advanced-provider-configuration.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,47 @@ azure:
127127
storage_account_postfix: t65ft6q5
128128
```
129129

130+
### Launch Templates (Optional)
131+
132+
Nebari supports configuring launch templates for your node groups, enabling you to customize settings like the AMI ID and pre-bootstrap commands. This is particularly useful if you need to use a custom AMI or perform specific actions before the node joins the cluster.
133+
134+
#### Configuring a Launch Template
135+
136+
To configure a launch template for a node group in your `nebari-config.yaml`, add the `launch_template` section under the desired node group:
137+
138+
```yaml
139+
amazon_web_services:
140+
region: us-west-2
141+
kubernetes_version: "1.18"
142+
node_groups:
143+
custom-node-group:
144+
instance: "m5.large"
145+
min_nodes: 1
146+
max_nodes: 5
147+
gpu: false # Set to true if using GPU instances
148+
launch_template:
149+
ami_id: ami-0abcdef1234567890 # Replace with your custom AMI ID
150+
pre_bootstrap_command: "echo 'Hello, World!'" # Command to run before the node joins the cluster
151+
```
152+
153+
**Parameters:**
154+
155+
- `ami_id` (Optional): The ID of the custom AMI to use for the nodes in this group. If specified, the `ami_type` is automatically set to `CUSTOM`.
156+
- `pre_bootstrap_command` (Optional): A command or script to execute on the node before it joins the Kubernetes cluster. This can be used for custom setup or configuration tasks.
157+
158+
:::note
159+
If an `ami_id` is not provided, AWS will use the default Amazon Linux 2 AMI for the
160+
specified instance type. You can find the latest optimized AMI IDs for Amazon EKS in you
161+
cluster region by inspecting its respective SSM parameter. For more information, see
162+
[Retrieve recommended Amazon Linux AMI IDs](https://docs.aws.amazon.com/eks/latest/userguide/retrieve-ami-id.html).
163+
:::
164+
165+
:::warning **Important:** If you add a `launch_template` to an existing node group that was previously created without one, AWS will treat this as a change requiring the replacement of the entire node group. This action will trigger a reallocation of resources, effectively destroying the current node group and recreating it. This behavior is due to how AWS handles self-managed node groups versus those using launch templates with custom settings.
166+
:::
167+
168+
:::hint **Recommendation:** To avoid unexpected downtime or data loss, consider creating a new node group with the launch template settings and migrating your workloads accordingly. This approach allows you to implement the new configuration without disrupting your existing resources.
169+
:::
170+
130171
</TabItem>
131172

132173
<TabItem value="do" label="DigitalOcean">

0 commit comments

Comments
 (0)