You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/vendor/helm-v2-migrate.md
+27-37Lines changed: 27 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,13 @@
1
1
# Migrating Existing Installations to HelmChart v2
2
2
3
-
This topic describes how to migrate existing Replicated KOTS installations to the KOTS HelmChart `kots.io/v1beta2` (HelmChart v2) installation method, without having to reinstall the application. It also includes information about how to support both HelmChart v1 and HelmChart v2 installations from a single release, and frequently-asked questions related to migrating to HelmChart v2.
4
-
5
-
For more information about how KOTS deploys Helm charts, see [About Distributing Helm Charts with KOTS](helm-native-about).
3
+
This topic describes how to migrate existing Replicated KOTS installations to the KOTS HelmChart `kots.io/v1beta2` (HelmChart v2) installation method, without having to reinstall the application. It also includes information about how to support both HelmChart v1 and HelmChart v2 installations from a single release, and lists frequently-asked questions (FAQs) related to migrating to HelmChart v2.
6
4
5
+
:::note
7
6
For additional support migrating existing installations to HelmChart v2, reach out to your Replicated account representative.
7
+
:::
8
8
9
9
## Migrate to HelmChart v2
10
10
11
-
There are different migrations paths depending on which of the following methods were used to install the application previously:
12
-
* HelmChart `kots.io/v1beta1` with `useHelmInstall: true`
13
-
* HelmChart `kots.io/v1beta1` with `useHelmInstall: false`
14
-
* KOTS installations of releases packaged as standard Kubernetes manifests
15
-
16
11
### Requirement
17
12
18
13
The HelmChart v2 custom resource is supported for installations that use KOTS v1.99.0 or later. If any of your customers are running a version of KOTS earlier than v1.99.0, see [Support Customers on KOTS Versions Earlier Than v1.99.0](#support-both-v1-v2) below for more information about how to support both HelmChart v1 and HelmChart v2 installations from the same release.
@@ -49,9 +44,9 @@ To migrate existing installations from HelmChart v1 and `useHelmInstall: false`
49
44
50
45
1. Create a new release containing your application files:
51
46
52
-
1. Add the `kots.io/keep` annotation to any resources that were previously deployed with `kubectl apply`. This includes any resources packaged as standard Kubernetes manifests or in Helm `templates`. The `kots.io/keep` annotation prevents KOTS from uninstalling these resources when deploying the release with HelmChart v2.
47
+
1. Add the `kots.io/keep` annotation to any resources that were previously installed with `kubectl apply`, including resources defined in Kubernetes manifests or in your Helm `templates`. The `kots.io/keep` annotation prevents KOTS from uninstalling resources that were previously installed without Helm when upgrading using the HelmChart v2 method.
53
48
54
-
1. In the Embedded Cluster Config, add the `--take-ownership` flag to the `helmUpgradeFlags` field, as shown below:
49
+
1. In the `helmUpgradeFlags` field of the Embedded Cluster Config, add the `--take-ownership` flag, as shown below:
55
50
56
51
```yaml
57
52
# HelmChart v1 beta2
@@ -64,7 +59,7 @@ To migrate existing installations from HelmChart v1 and `useHelmInstall: false`
64
59
- --take-ownership
65
60
```
66
61
67
-
When the `--take-ownership` flag is enabled, Helm automatically takes ownership of existing resources in the cluster during upgrade.
62
+
When the `--take-ownership` flag is enabled, Helm automatically takes ownership of existing resources in the cluster during upgrade.
68
63
69
64
1. (Recommended) In the KOTS Application custom resource, set `minKotsVersion: 1.122.0`. The Helm `--take-ownership` flag is not supported on versions of KOTS earlier than 1.122.0.
70
65
@@ -82,13 +77,13 @@ To migrate existing installations from HelmChart v1 and `useHelmInstall: false`
82
77
83
78
1. Configure the HelmChart custom resource to rewrite images, inject pull secrets, and add backup labels. See [Configuring the HelmChart Custom Resource v2](helm-native-v2-using).
84
79
85
-
1. Save the release and promote to channel that your team uses for testing.
80
+
1. Promote the release to an internal-only channel that your team uses for testing.
86
81
87
-
1. Install the release in a development environment to test that you can upgrade to the new release successfully.
82
+
1. In a development environment, install the release to test that you can upgrade to the new release successfully.
88
83
89
-
1. After testing, promote the release to one or more of your customer-facing channels.
84
+
1. When you are done testing, promote the release to one or more of your customer-facing channels.
90
85
91
-
Your customers can follow the regular upgrade flow in the Admin Console to update their instance to the new version using HelmChart `v1beta2`.
86
+
Your customers can follow the standard upgrade process in the Admin Console to update their instance to the new version.
92
87
93
88
### Migrate From Standard Kubernetes Manifests
94
89
@@ -98,19 +93,15 @@ To migrate applications that were previously packaged as standard Kubernetes man
98
93
99
94
1. Create a new release containing the Kubernetes manifests for your application.
100
95
101
-
1. For each of the application manifests in the release, add the `kots.io/keep` annotation.
102
-
103
-
This ensures that KOTS will not delete these resources from the cluster when deploying a new release that uses the HelmChart v2 method.
96
+
1. Add the `kots.io/keep` annotation to each of the application manifests in the release. The `kots.io/keep` annotation prevents KOTS from uninstalling resources that were previously installed without Helm when upgrading using the HelmChart v2 method.
104
97
105
98
1. Save the release.
106
99
107
100
1. Create another new release:
108
101
109
-
1. In the release, add your new application Helm chart or charts.
110
-
111
-
1. Remove the Kubernetes manifests that are replaced by the Helm chart(s).
102
+
1. In the release, add your application Helm chart or charts. Remove the application manifests for resources that were adopted into the Helm chart(s).
112
103
113
-
1. In the Embedded Cluster Config, add the `--take-ownership` flag to the `helmUpgradeFlags` field, as shown below:
104
+
1. In the `helmUpgradeFlags` field of the Embedded Cluster Config, add the `--take-ownership` flag, as shown below:
114
105
115
106
```yaml
116
107
# HelmChart v1 beta2
@@ -129,33 +120,31 @@ To migrate applications that were previously packaged as standard Kubernetes man
129
120
130
121
1. Save the release.
131
122
132
-
1. Test the upgrade and migration process:
123
+
1. Test the upgrade process:
133
124
134
-
1. Promote the first release to an internal-only channel used for testing.
135
-
136
-
:::note
137
-
Replicated recommends that you mark the release as required because customers must upgrade to this release first before they can upgrade to the release that migrates to HelmChart v2.
138
-
:::
125
+
1. Promote the first release to an internal-only channel that your team uses for testing.
139
126
140
127
1. In a development environment, install the release.
141
128
142
129
1. Promote the second release to the same channel.
143
130
144
-
1. In your development environment, upgrade to the second release to migrate the installation to HelmChart v2. Confirm that none of the existing resources in the cluster were deleted during upgrade.
131
+
1. In your development environment, upgrade to the second release to migrate the installation to HelmChart v2.
145
132
146
-
1. When you are ready, promote the first release containing your application manifests to one or more customer-facing channels.
133
+
1. After you are done testing the migration process, promote the first release containing your application manifests to one or more customer-facing channels.
134
+
135
+
:::note
136
+
Replicated recommends that you mark the release as required because customers must upgrade to this release first before they can upgrade to the release that migrates their installation to HelmChart v2.
137
+
:::
147
138
148
-
1. Promote the second release containing your application Helm chart to the same channel or channels.
139
+
1. Promote the second release containing your application Helm chart to the same channels.
149
140
150
-
1. Instruct customers to migrate by first upgrading to the release packaged with standard manifests, then upgrading to the release packaged with Helm second.
141
+
1. Instruct customers to migrate by first upgrading to the release containing the standard manifests, then upgrading to the release packaged with Helm second.
151
142
152
143
## Support Customers on KOTS Versions Earlier Than v1.99.0 {#support-both-v1-v2}
153
144
154
145
The HelmChart v2 installation method requires KOTS v1.99.0 or later. If you have existing customers that have not yet upgraded to KOTS v1.99.0 or later, Replicated recommends that you support both the HelmChart v2 and v1 installation methods from the same release until all installations are running KOTS v1.99.0 or later.
155
146
156
-
To support both installation methods from the same release, include both versions of the HelmChart custom resource for each Helm chart in your application releases:
157
-
* HelmChart `kots.io/v1beta2`
158
-
* HelmChart `kots.io/v1beta1` with `useHelmInstall: true`
147
+
To support both installation methods from the same release, include both versions of the HelmChart custom resource for each Helm chart in your application releases (HelmChart `kots.io/v1beta2` and HelmChart `kots.io/v1beta1` with `useHelmInstall: true`).
159
148
160
149
When you include both versions of the HelmChart custom resource for a Helm chart, installations with KOTS v1.98.0 or earlier use the v1 method, while installations with KOTS v1.99.0 or later use v2.
161
150
@@ -185,7 +174,8 @@ The `--take-ownership` flag is required for the following types of migrations:
185
174
186
175
`--take-ownership` is _not_ needed when migrating from HelmChart v1 with `useHelmInstall: true` to HelmChart v1beta2. This is because the HelmChart v1 with `useHelmInstall: true` method deploys the given application with Helm, rather than using `kubectl apply`.
187
176
188
-
### Why is the migration path from HelmChart v1 with `useHelmInstall: false` different than HelmChart v1 with `useHelmInstall: true`?
177
+
### What is the difference between HelmChart v1 with `useHelmInstall: false` and `useHelmInstall: true`?
189
178
190
-
With HelmChart v1 and `useHelmInstall: false`, KOTS renders the Helm templates and deploys them as standard Kubernetes manifests using `kubectl apply`. This differs from both HelmChart v1 and `useHelmInstall: true` and HelmChart v2, where KOTS installs the release using Helm.
179
+
With HelmChart v1 and `useHelmInstall: false`, KOTS renders the Helm templates and deploys them as standard Kubernetes manifests using `kubectl apply`. This differs from both the HelmChart v1 with `useHelmInstall: true` and HelmChart v2 methods, where KOTS installs the application using Helm.
191
180
181
+
For more information about how KOTS deploys Helm charts, including information about the deprecated HelmChart v1 installation methods, see [About Distributing Helm Charts with KOTS](helm-native-about).
0 commit comments