Skip to content

Commit

Permalink
Add CRD upgrade information
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Oct 18, 2023
1 parent bcd5f5e commit f38f45a
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 21 deletions.
2 changes: 1 addition & 1 deletion website/content/en/preview/concepts/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Concepts"
linkTitle: "Concepts"
weight: 10
weight: 20
description: >
Understand key concepts of Karpenter
---
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/preview/contributing/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Contributing"
linkTitle: "Contributing"
weight: 100
weight: 40
description: >
Learn about how to contribute to Karpenter
---
2 changes: 1 addition & 1 deletion website/content/en/preview/faq.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "FAQs"
linkTitle: "FAQs"
weight: 90
weight: 60
description: >
Review Karpenter Frequently Asked Questions
---
Expand Down
4 changes: 1 addition & 3 deletions website/content/en/preview/getting-started/_index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
title: "Getting Started"
linkTitle: "Getting Started"
weight: 1
weight: 10
description: >
Choose from different methods to get started with Karpenter
cascade:
type: docs
---


Expand Down
2 changes: 1 addition & 1 deletion website/content/en/preview/reference/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Reference"
linkTitle: "Reference"
weight: 100
weight: 50
description: >
Reference documentation for Karpenter
---
2 changes: 1 addition & 1 deletion website/content/en/preview/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Troubleshooting"
linkTitle: "Troubleshooting"
weight: 90
weight: 70
description: >
Troubleshoot Karpenter problems
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Upgrade"
linkTitle: "Upgrade"
weight: 95
title: "Upgrading"
linkTitle: "Upgrading"
weight: 30
description: >
Upgrading Karpenter guide and reference
cascade:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Compatibility"
linkTitle: "Karpenter Compatibility"
linkTitle: "Compatibility"
weight: 30
description: >
Compatibility issues for Karpenter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,29 @@ Karpenter is a controller that runs in your cluster, but it is not tied to a spe
Use your existing upgrade mechanisms to upgrade your core add-ons in Kubernetes and keep Karpenter up to date on bug fixes and new features.
This guide contains information needed to upgrade to the latest release of Karpenter, along with compatibility issues you need to be aware of when upgrading from earlier Karpenter versions.

### CRD Upgrades

Karpenter ships with a few Custom Resource Definitions (CRDs). These CRDs are published:
* As an independent helm chart [karpenter-crd](https://gallery.ecr.aws/karpenter/karpenter-crd) - [source](https://github.com/aws/karpenter/blob/main/charts/karpenter-crd) that can be used by Helm to manage the lifecycle of these CRDs.
* To upgrade or install `karpenter-crd` run:
```
helm upgrade --install karpenter-crd oci://public.ecr.aws/karpenter/karpenter-crd --version vx.y.z --namespace karpenter --create-namespace
```

{{% alert title="Note" color="warning" %}}
If you get the error `invalid ownership metadata; label validation error:` while installing the `karpenter-crd` chart from an older version of Karpenter, follow the [Troubleshooting Guide]({{<ref "../troubleshooting#helm-error-when-upgrading-from-older-karpenter-version" >}}) for details on how to resolve these errors.
{{% /alert %}}

* As part of the helm chart [karpenter](https://gallery.ecr.aws/karpenter/karpenter) - [source](https://github.com/aws/karpenter/blob/main/charts/karpenter/crds). Helm [does not manage the lifecycle of CRDs using this method](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/), the tool will only install the CRD during the first installation of the helm chart. Subsequent chart upgrades will not add or remove CRDs, even if the CRDs have changed. When CRDs are changed, we will make a note in the version's upgrade guide.

In general, you can reapply the CRDs in the `crds` directory of the Karpenter helm chart:

```shell
kubectl apply -f https://raw.githubusercontent.com/aws/karpenter{{< githubRelRef >}}pkg/apis/crds/karpenter.sh_nodepols.yaml
kubectl apply -f https://raw.githubusercontent.com/aws/karpenter{{< githubRelRef >}}pkg/apis/crds/karpenter.sh_nodeclaims.yaml
kubectl apply -f https://raw.githubusercontent.com/aws/karpenter{{< githubRelRef >}}pkg/apis/crds/karpenter.k8s.aws_ec2nodeclasses.yaml
```
g
### Upgrading to v0.32.0+

#### v1beta1 Migration
Expand All @@ -26,7 +49,7 @@ Here is some information you should know about upgrading the Karpenter controlle

Some things that will help you with this upgrade include:

* **[Karpenter Upgrade Reference]({{< relref "v1beta1-reference" >}})**: Provides a complete reference to help you transition your Provisioner, Machine, and AWSNodeTemplate manifests, as well as other components, to be able to work with the new v1beta1 names, labels, and other elements.
* **[v1beta1 Upgrade Reference]({{< relref "v1beta1-reference" >}})**: Provides a complete reference to help you transition your Provisioner, Machine, and AWSNodeTemplate manifests, as well as other components, to be able to work with the new v1beta1 names, labels, and other elements.
* **[Karpenter conversion tool](https://github.com/aws/karpenter/tree/main/tools/karpenter-convert)**: Simplifies the creation of NodePool and EC2NodeClass manifests.

##### Procedure
Expand All @@ -36,7 +59,7 @@ This procedure assumes you are running the Karpenter controller on cluster and w
**NOTE**: Please read through the entire procedure before beginning the upgrade. There are major changes in this upgrade, so you should carefully evaluate your cluster and workloads before proceeding.


### Prerequisites
#### Prerequisites

To upgrade your provisioner and AWSNodeTemplate YAML files to be compatible with v1beta1, you can either update them manually or use the [karpenter-convert](https://github.com/aws/karpenter/tree/main/tools/karpenter-convert) CLI tool. To install that tool:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@ Use this document as a reference to the changes that were introduced in the curr
The [Upgrade Guide]({{< relref "upgrade-guide" >}}) steps you through the process of upgrading Karpenter for the latest release.
For a more general understanding of Karpenter's compatibility, see the [Compatibility Document]({{< relref "compatibility" >}}).

## Karpenter Migration Information

Use the information below to help migrate your Karpenter v1alpha assets to v1beta1.

### Custom Resource Definition (CRD) Upgrades
## Custom Resource Definition (CRD) Upgrades

Karpenter ships with a few Custom Resource Definitions (CRDs). Starting with v0.32.0, CRDs representing Provisioners, Machines, and AWS Node Templates are replaced by those for NodePools, NodeClaims, and EC2Nodeclasses, respectively.
You can find these CRDs by visiting the [Karpenter GitHub repository](https://github.com/aws/karpenter/tree/main/pkg/apis/crds).
You can find these CRDs by visiting the [Karpenter GitHub repository](https://github.com/aws/karpenter/tree{{< githubRelRef >}}pkg/apis/crds).

The [Karpenter Upgrade Guide}(]({{< relref "upgrade-guide" >}}) describes how to install the new CRDs.
The [Upgrade Guide]({{< relref "upgrade-guide" >}}) describes how to install the new CRDs.

## Annotations, Labels, and Status Conditions

Expand Down

0 comments on commit f38f45a

Please sign in to comment.