Skip to content

Commit 6093572

Browse files
authoredSep 16, 2022
docs: Update Website Launch Template Guidelines (#2516)
1 parent a024b8b commit 6093572

23 files changed

+313
-314
lines changed
 

‎website/content/en/preview/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/preview/AWS/provisioning.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ spec:
4646
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4747
See below for other AWS provider-specific parameters.
4848

49-
## spec.providerRef
49+
## AWSNodeTemplate
5050

51-
The ProviderRef is a reference to the AWSNodeTemplate resource that contains all the parameters needed by the AWS Cloud Provider.
52-
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
51+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance. You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
5352

5453
### InstanceProfile
54+
5555
An `InstanceProfile` is a way to pass a single IAM role to an EC2 instance. Karpenter will not create one automatically.
5656
A default profile may be specified on the controller, allowing it to be omitted here. If not specified as either a default
5757
or on the controller, node provisioning will fail. The KarpenterControllerPolicy will also need to have permissions for
@@ -62,19 +62,6 @@ spec:
6262
instanceProfile: MyInstanceProfile
6363
```
6464

65-
### LaunchTemplate
66-
67-
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
68-
69-
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
70-
71-
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
72-
73-
```
74-
spec:
75-
launchTemplate: MyLaunchTemplate
76-
```
77-
7865
### SubnetSelector (required)
7966

8067
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
@@ -285,6 +272,19 @@ Specify AMIs explicitly by ID:
285272
aws-ids: "ami-123,ami-456"
286273
```
287274

275+
### LaunchTemplate (Deprecated)
276+
277+
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
278+
279+
Karpenter automatically generates Launch Templates given the other values set in the AWSNodeTemplate. If specified, Karpenter will replace the generated launch template with the one given.
280+
281+
Review the [Launch Template documentation]({{<ref "./launch-templates.md" >}}) to learn how to create a custom one.
282+
283+
```
284+
spec:
285+
launchTemplate: MyLaunchTemplate
286+
```
287+
288288
## spec.provider (Deprecated)
289289

290290
Prior to the introduction of `spec.providerRef`, parameters for the AWS Cloud Provider could be specified within the Provisioner itself through the `spec.provider` field. This field in the Provisioners has now been deprecated, and all fields previously specified through the ProvisionerSpec can now be specified in the `AWSNodeTemplate` CRD instead. See the [upgrade guide for more information](../../upgrade-guide). New parameters can only be specified in the `AWSNodeTemplate` CRD.
@@ -296,7 +296,7 @@ The AWS cloud provider adds several labels to nodes that describe the node resou
296296
- `karpenter.k8s.aws/instance-memory`
297297
- `karpenter.k8s.aws/instance-gpu-name`
298298

299-
The `karpenter.k8s.aws/instance-cpu` and `karpenter.k8s.aws/instance-memory` values are numeric which also allows constructing requirements for them using the `Gt` and `Lt` operators.
299+
The `karpenter.k8s.aws/instance-cpu` and `karpenter.k8s.aws/instance-memory` values are numeric which also allows constructing requirements for them using the `Gt` and `Lt` operators.
300300

301301
The standard rules for `Gt` and `Lt` apply:
302302

@@ -316,7 +316,7 @@ These requirements can be useful to select nodes of a particular "shape". For ex
316316
- "16385"
317317
```
318318
319-
A requirement that specifies a specific value for `karpenter.k8s.aws/instance-gpu-name` can be used to select for all instance types that have a particular GPU type.
319+
A requirement that specifies a specific value for `karpenter.k8s.aws/instance-gpu-name` can be used to select for all instance types that have a particular GPU type.
320320

321321
```yaml
322322
- key: karpenter.k8s.aws/instance-gpu-name

‎website/content/en/v0.12.0/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.12.0/AWS/provisioning.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ spec:
4040
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4141
See below for other AWS provider-specific parameters.
4242

43-
## spec.provider
43+
## AWSNodeTemplate
4444

45-
This section covers parameters of the AWS Cloud Provider.
46-
47-
[Review these fields in the code.](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/cloudprovider/aws/apis/v1alpha1/provider.go)
45+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
46+
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
4847

4948
### InstanceProfile
5049
An `InstanceProfile` is a way to pass a single IAM role to an EC2 instance. Karpenter will not create one automatically.
@@ -57,7 +56,7 @@ spec:
5756
instanceProfile: MyInstanceProfile
5857
```
5958

60-
### LaunchTemplate
59+
### LaunchTemplate (Deprecated)
6160

6261
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
6362

‎website/content/en/v0.12.1/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.12.1/AWS/provisioning.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ spec:
4040
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4141
See below for other AWS provider-specific parameters.
4242

43-
## spec.provider
43+
## AWSNodeTemplate
4444

45-
This section covers parameters of the AWS Cloud Provider.
46-
47-
[Review these fields in the code.](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/cloudprovider/aws/apis/v1alpha1/provider.go)
45+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
46+
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
4847

4948
### InstanceProfile
5049
An `InstanceProfile` is a way to pass a single IAM role to an EC2 instance. Karpenter will not create one automatically.
@@ -57,7 +56,7 @@ spec:
5756
instanceProfile: MyInstanceProfile
5857
```
5958

60-
### LaunchTemplate
59+
### LaunchTemplate (Deprecated)
6160

6261
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
6362

‎website/content/en/v0.13.0/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.13.0/AWS/provisioning.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ spec:
4646
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4747
See below for other AWS provider-specific parameters.
4848

49-
## spec.providerRef
49+
## AWSNodeTemplate
5050

51-
The ProviderRef is a reference to the AWSNodeTemplate resource that contains all the parameters needed by the AWS Cloud Provider.
51+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
5252
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
5353

5454
### InstanceProfile
@@ -61,19 +61,6 @@ spec:
6161
instanceProfile: MyInstanceProfile
6262
```
6363

64-
### LaunchTemplate
65-
66-
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
67-
68-
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
69-
70-
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
71-
72-
```
73-
spec:
74-
launchTemplate: MyLaunchTemplate
75-
```
76-
7764
### SubnetSelector (required)
7865

7966
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
@@ -244,6 +231,19 @@ spec:
244231
You can control the UserData that needs to be applied to your worker nodes via this field. Review the [Custom UserData documentation](../user-data/) to learn the necessary steps
245232
If you need to specify a launch template in addition to UserData, then review the [Launch Template documentation](../launch-templates/) instead and utilize the `spec.providerRef.launchTemplate` field.
246233
234+
### LaunchTemplate (Deprecated)
235+
236+
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
237+
238+
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
239+
240+
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
241+
242+
```
243+
spec:
244+
launchTemplate: MyLaunchTemplate
245+
```
246+
247247
## spec.provider (Deprecated)
248248
249249
Prior to the introduction of `spec.providerRef`, parameters for the AWS Cloud Provider could be specified within the Provisioner itself through the `spec.provider` field. This field in the Provisioners has now been deprecated, and all fields previously specified through the ProvisionerSpec can now be specified in the `AWSNodeTemplate` CRD instead. See the [upgrade guide for more information](../upgrade-guide/_index.md). New parameters can only be specified in the `AWSNodeTemplate` CRD.

‎website/content/en/v0.13.1/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.13.1/AWS/provisioning.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ spec:
4646
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4747
See below for other AWS provider-specific parameters.
4848

49-
## spec.providerRef
49+
## AWSNodeTemplate
5050

51-
The ProviderRef is a reference to the AWSNodeTemplate resource that contains all the parameters needed by the AWS Cloud Provider.
51+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
5252
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
5353

5454
### InstanceProfile
@@ -61,19 +61,6 @@ spec:
6161
instanceProfile: MyInstanceProfile
6262
```
6363

64-
### LaunchTemplate
65-
66-
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
67-
68-
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
69-
70-
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
71-
72-
```
73-
spec:
74-
launchTemplate: MyLaunchTemplate
75-
```
76-
7764
### SubnetSelector (required)
7865

7966
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
@@ -244,6 +231,19 @@ spec:
244231
You can control the UserData that needs to be applied to your worker nodes via this field. Review the [Custom UserData documentation](../user-data/) to learn the necessary steps
245232
If you need to specify a launch template in addition to UserData, then review the [Launch Template documentation](../launch-templates/) instead and utilize the `spec.providerRef.launchTemplate` field.
246233
234+
### LaunchTemplate (Deprecated)
235+
236+
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
237+
238+
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
239+
240+
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
241+
242+
```
243+
spec:
244+
launchTemplate: MyLaunchTemplate
245+
```
246+
247247
## spec.provider (Deprecated)
248248
249249
Prior to the introduction of `spec.providerRef`, parameters for the AWS Cloud Provider could be specified within the Provisioner itself through the `spec.provider` field. This field in the Provisioners has now been deprecated, and all fields previously specified through the ProvisionerSpec can now be specified in the `AWSNodeTemplate` CRD instead. See the [upgrade guide for more information](../upgrade-guide/_index.md). New parameters can only be specified in the `AWSNodeTemplate` CRD.

‎website/content/en/v0.13.2/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.13.2/AWS/provisioning.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ spec:
4646
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4747
See below for other AWS provider-specific parameters.
4848

49-
## spec.providerRef
49+
## AWSNodeTemplate
5050

51-
The ProviderRef is a reference to the AWSNodeTemplate resource that contains all the parameters needed by the AWS Cloud Provider.
51+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
5252
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
5353

5454
### InstanceProfile
@@ -61,19 +61,6 @@ spec:
6161
instanceProfile: MyInstanceProfile
6262
```
6363

64-
### LaunchTemplate
65-
66-
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
67-
68-
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
69-
70-
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
71-
72-
```
73-
spec:
74-
launchTemplate: MyLaunchTemplate
75-
```
76-
7764
### SubnetSelector (required)
7865

7966
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
@@ -244,6 +231,19 @@ spec:
244231
You can control the UserData that needs to be applied to your worker nodes via this field. Review the [Custom UserData documentation](../user-data/) to learn the necessary steps
245232
If you need to specify a launch template in addition to UserData, then review the [Launch Template documentation](../launch-templates/) instead and utilize the `spec.providerRef.launchTemplate` field.
246233
234+
### LaunchTemplate (Deprecated)
235+
236+
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
237+
238+
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
239+
240+
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
241+
242+
```
243+
spec:
244+
launchTemplate: MyLaunchTemplate
245+
```
246+
247247
## spec.provider (Deprecated)
248248
249249
Prior to the introduction of `spec.providerRef`, parameters for the AWS Cloud Provider could be specified within the Provisioner itself through the `spec.provider` field. This field in the Provisioners has now been deprecated, and all fields previously specified through the ProvisionerSpec can now be specified in the `AWSNodeTemplate` CRD instead. See the [upgrade guide for more information](../upgrade-guide/_index.md). New parameters can only be specified in the `AWSNodeTemplate` CRD.

‎website/content/en/v0.14.0-rc.0/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.14.0-rc.0/AWS/provisioning.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ spec:
4646
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4747
See below for other AWS provider-specific parameters.
4848

49-
## spec.providerRef
49+
## AWSNodeTemplate
5050

51-
The ProviderRef is a reference to the AWSNodeTemplate resource that contains all the parameters needed by the AWS Cloud Provider.
51+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
5252
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
5353

5454
### InstanceProfile
@@ -62,19 +62,6 @@ spec:
6262
instanceProfile: MyInstanceProfile
6363
```
6464

65-
### LaunchTemplate
66-
67-
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
68-
69-
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
70-
71-
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
72-
73-
```
74-
spec:
75-
launchTemplate: MyLaunchTemplate
76-
```
77-
7865
### SubnetSelector (required)
7966

8067
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
@@ -285,6 +272,19 @@ Specify AMIs explicitly by ID:
285272
aws-ids: "ami-123,ami-456"
286273
```
287274

275+
### LaunchTemplate (Deprecated)
276+
277+
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
278+
279+
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
280+
281+
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
282+
283+
```
284+
spec:
285+
launchTemplate: MyLaunchTemplate
286+
```
287+
288288
## spec.provider (Deprecated)
289289

290290
Prior to the introduction of `spec.providerRef`, parameters for the AWS Cloud Provider could be specified within the Provisioner itself through the `spec.provider` field. This field in the Provisioners has now been deprecated, and all fields previously specified through the ProvisionerSpec can now be specified in the `AWSNodeTemplate` CRD instead. See the [upgrade guide for more information](../../upgrade-guide). New parameters can only be specified in the `AWSNodeTemplate` CRD.

‎website/content/en/v0.14.0/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.14.0/AWS/provisioning.md

+15-14
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ spec:
4646
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4747
See below for other AWS provider-specific parameters.
4848

49-
## spec.providerRef
49+
## AWSNodeTemplate
5050

51-
The ProviderRef is a reference to the AWSNodeTemplate resource that contains all the parameters needed by the AWS Cloud Provider.
51+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
5252
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
5353

5454
### InstanceProfile
@@ -62,18 +62,6 @@ spec:
6262
instanceProfile: MyInstanceProfile
6363
```
6464

65-
### LaunchTemplate
66-
67-
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
68-
69-
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
70-
71-
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
72-
73-
```
74-
spec:
75-
launchTemplate: MyLaunchTemplate
76-
```
7765

7866
### SubnetSelector (required)
7967

@@ -285,6 +273,19 @@ Specify AMIs explicitly by ID:
285273
aws-ids: "ami-123,ami-456"
286274
```
287275

276+
### LaunchTemplate (Deprecated)
277+
278+
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
279+
280+
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
281+
282+
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
283+
284+
```
285+
spec:
286+
launchTemplate: MyLaunchTemplate
287+
```
288+
288289
## spec.provider (Deprecated)
289290

290291
Prior to the introduction of `spec.providerRef`, parameters for the AWS Cloud Provider could be specified within the Provisioner itself through the `spec.provider` field. This field in the Provisioners has now been deprecated, and all fields previously specified through the ProvisionerSpec can now be specified in the `AWSNodeTemplate` CRD instead. See the [upgrade guide for more information](../../upgrade-guide). New parameters can only be specified in the `AWSNodeTemplate` CRD.

‎website/content/en/v0.15.0/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.15.0/AWS/provisioning.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ spec:
4646
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4747
See below for other AWS provider-specific parameters.
4848

49-
## spec.providerRef
49+
## AWSNodeTemplate
5050

51-
The ProviderRef is a reference to the AWSNodeTemplate resource that contains all the parameters needed by the AWS Cloud Provider.
51+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
5252
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
5353

5454
### InstanceProfile
@@ -62,19 +62,6 @@ spec:
6262
instanceProfile: MyInstanceProfile
6363
```
6464

65-
### LaunchTemplate
66-
67-
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
68-
69-
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
70-
71-
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
72-
73-
```
74-
spec:
75-
launchTemplate: MyLaunchTemplate
76-
```
77-
7865
### SubnetSelector (required)
7966

8067
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
@@ -285,6 +272,19 @@ Specify AMIs explicitly by ID:
285272
aws-ids: "ami-123,ami-456"
286273
```
287274

275+
### LaunchTemplate (Deprecated)
276+
277+
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
278+
279+
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
280+
281+
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
282+
283+
```
284+
spec:
285+
launchTemplate: MyLaunchTemplate
286+
```
287+
288288
## spec.provider (Deprecated)
289289

290290
Prior to the introduction of `spec.providerRef`, parameters for the AWS Cloud Provider could be specified within the Provisioner itself through the `spec.provider` field. This field in the Provisioners has now been deprecated, and all fields previously specified through the ProvisionerSpec can now be specified in the `AWSNodeTemplate` CRD instead. See the [upgrade guide for more information](../../upgrade-guide). New parameters can only be specified in the `AWSNodeTemplate` CRD.

‎website/content/en/v0.16.0/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.16.0/AWS/provisioning.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ spec:
4646
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4747
See below for other AWS provider-specific parameters.
4848

49-
## spec.providerRef
49+
## AWSNodeTemplate
5050

51-
The ProviderRef is a reference to the AWSNodeTemplate resource that contains all the parameters needed by the AWS Cloud Provider.
51+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
5252
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
5353

5454
### InstanceProfile
@@ -62,19 +62,6 @@ spec:
6262
instanceProfile: MyInstanceProfile
6363
```
6464

65-
### LaunchTemplate
66-
67-
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
68-
69-
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
70-
71-
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
72-
73-
```
74-
spec:
75-
launchTemplate: MyLaunchTemplate
76-
```
77-
7865
### SubnetSelector (required)
7966

8067
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
@@ -285,6 +272,19 @@ Specify AMIs explicitly by ID:
285272
aws-ids: "ami-123,ami-456"
286273
```
287274

275+
### LaunchTemplate (Deprecated)
276+
277+
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
278+
279+
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
280+
281+
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
282+
283+
```
284+
spec:
285+
launchTemplate: MyLaunchTemplate
286+
```
287+
288288
## spec.provider (Deprecated)
289289

290290
Prior to the introduction of `spec.providerRef`, parameters for the AWS Cloud Provider could be specified within the Provisioner itself through the `spec.provider` field. This field in the Provisioners has now been deprecated, and all fields previously specified through the ProvisionerSpec can now be specified in the `AWSNodeTemplate` CRD instead. See the [upgrade guide for more information](../../upgrade-guide). New parameters can only be specified in the `AWSNodeTemplate` CRD.

‎website/content/en/v0.16.1/AWS/launch-templates.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
2-
title: "Launch Templates and Custom Images"
3-
linkTitle: "Launch Templates"
4-
weight: 80
2+
title: "Launch Templates and Custom Images (Deprecated)"
3+
linkTitle: "Launch Templates (Deprecated)"
4+
weight: 0
55
description: >
66
Create custom launch templates for Karpenter
77
---
8+
**Karpenter recommends using generated launch templates by specifying requirements in the [Provisioner and ProviderRef]({{<ref "./provisioning.md" >}}) natively.**
89

910
By default, Karpenter generates launch templates with the following features:
1011
- [EKS Optimized AMI](https://docs.aws.amazon.com/eks/latest/userguide/eks-optimized-ami.html) for nodes.
1112
- Encrypted EBS root volumes with the default (AWS managed) KMS key for nodes.
1213

13-
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), you need a custom launch template.
14+
In addition, Karpenter also fills the generated launch templates with the values in the [referenced AWSNodeTemplate]({{<ref "./provisioning.md" >}}) including any [Custom AMIs or Custom User Data]({{<ref "./user-data.md" >}}).
1415

15-
Karpenter supports using custom launch templates.
16+
If these features are not sufficient for your use case (customizing node image, customizing EBS KMS key, etc), [you may need a custom launch template]({{<ref "./launch-templates/#creating-the-launch-template" >}}).
1617

1718
Note: When using a custom launch template, **you are taking responsibility** for maintaining the launch template, including updating which AMI is used (i.e., for security updates). In the default configuration, Karpenter will use the latest version of the EKS optimized AMI, which is maintained by AWS. Without a custom launch template, Karpenter will create its own. If these launch templates aren't used for sixty seconds, Karpenter will clean them up.
1819

19-
2020
## Introduction
2121

2222
Karpenter follows existing AWS patterns for customizing the base image of
@@ -226,16 +226,16 @@ aws cloudformation create-stack \
226226
227227
### Define LaunchTemplate for Provisioner
228228
229-
The LaunchTemplate is ready to be used. Specify it by name in the [Provisioner
230-
CRD](../../provisioner/). Karpenter will use this template when creating new instances.
231-
The following is an example of a provisioner using the new template. Please replace the `CLUSTER_NAME` with the correct value.
229+
Now the launch template is ready to be used. Specify it by name in the [AWSNodeTemplate CRD]({{<ref "./provisioning.md#awsnodetemplate" >}}). Karpenter will use this template when creating new instances.
230+
The following is an example of a provisioner using the new template. Please replace the `${CLUSTER_NAME}` with the correct value.
232231
233232
```yaml
234-
apiVersion: karpenter.sh/v1alpha5
235-
kind: Provisioner
233+
apiVersion: karpenter.k8s.aws/v1alpha1
234+
kind: AWSNodeTemplate
235+
metadata:
236+
name: default
236237
spec:
237-
provider:
238-
launchTemplate: KarpenterCustomLaunchTemplate
239-
subnetSelector:
240-
karpenter.sh/discovery: CLUSTER_NAME
238+
launchTemplate: KarpenterCustomLaunchTemplate
239+
subnetSelector:
240+
karpenter.sh/discovery: ${CLUSTER_NAME}
241241
```

‎website/content/en/v0.16.1/AWS/provisioning.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ spec:
4646
Refer to [Provisioner API]({{<ref "../provisioner.md" >}}) for settings that are not specific to AWS.
4747
See below for other AWS provider-specific parameters.
4848

49-
## spec.providerRef
49+
## AWSNodeTemplate
5050

51-
The ProviderRef is a reference to the AWSNodeTemplate resource that contains all the parameters needed by the AWS Cloud Provider.
51+
In the AWS Cloud Provider, the providerRef is a reference to an AWSNodeTemplate resource that contains all the necessary parameters to launch an instance.
5252
You can review these fields [in the code](https://github.com/aws/karpenter/blob{{< githubRelRef >}}pkg/apis/awsnodetemplate/v1alpha1/awsnodetemplate.go).
5353

5454
### InstanceProfile
@@ -62,19 +62,6 @@ spec:
6262
instanceProfile: MyInstanceProfile
6363
```
6464

65-
### LaunchTemplate
66-
67-
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
68-
69-
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
70-
71-
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
72-
73-
```
74-
spec:
75-
launchTemplate: MyLaunchTemplate
76-
```
77-
7865
### SubnetSelector (required)
7966

8067
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
@@ -285,6 +272,19 @@ Specify AMIs explicitly by ID:
285272
aws-ids: "ami-123,ami-456"
286273
```
287274

275+
### LaunchTemplate (Deprecated)
276+
277+
A launch template is a set of configuration values sufficient for launching an EC2 instance (e.g., AMI, storage spec).
278+
279+
A custom launch template is specified by name. If none is specified, Karpenter will automatically create a launch template.
280+
281+
Review the [Launch Template documentation](../launch-templates/) to learn how to create a custom one.
282+
283+
```
284+
spec:
285+
launchTemplate: MyLaunchTemplate
286+
```
287+
288288
## spec.provider (Deprecated)
289289

290290
Prior to the introduction of `spec.providerRef`, parameters for the AWS Cloud Provider could be specified within the Provisioner itself through the `spec.provider` field. This field in the Provisioners has now been deprecated, and all fields previously specified through the ProvisionerSpec can now be specified in the `AWSNodeTemplate` CRD instead. See the [upgrade guide for more information](../../upgrade-guide). New parameters can only be specified in the `AWSNodeTemplate` CRD.

‎website/content/en/v0.5.0/AWS/provisioning.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737

3838
### SubnetSelector
3939

40-
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
40+
Karpenter discovers subnets using [AWS tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html).
4141

4242
Subnets may be specified by any AWS tag, including `Name`. Selecting tag values using wildcards ("\*") is supported.
4343

@@ -66,7 +66,7 @@ Select subnets by an arbitrary AWS tag key/value pair:
6666
Select subnets using wildcards:
6767
```
6868
subnetSelector:
69-
Name: *public*
69+
Name: *public*
7070
7171
```
7272

0 commit comments

Comments
 (0)
Please sign in to comment.