Performing Updates in kURL Clusters
This topic describes how to perform updates in Replicated kURL installations. It includes procedures for updating an application, as well as for updating the versions of Kubernetes, Replicated KOTS, and add-ons in a kURL cluster.
Update an Application
For kURL installations, you can update an application from the Admin Console. You can also set up automatic updates. See Configuring Automatic Updates.
Online Environments
To perform an update from the Admin Console:
-
In the Admin Console, go to the Version History tab.
-
Click Check for updates.
A new upstream version displays in the list of available versions.
-
(Optional) When there are multiple versions of an application, you can compare the changes between them by clicking Diff releases in the right corner.
You can review changes between any two arbitrary releases by clicking the icon in the header of the release column. Select the two versions to compare, and click Diff releases to show the relative changes between the two releases.
View a larger version of this image
-
(Optional) Click the View preflight checks icon to view or re-run the preflight checks.
-
Return to the Version History tab and click Deploy next to the target version.
Air Gap Environments
To perform an air gap update from the Admin Console:
-
Download the
.airgap
bundle for the new application version. Ensure that you can access the downloaded bundle from the environment where the Admin Console is running. -
In the Admin Console, go to the Version History tab.
-
Click Upload a new version.
A new upstream version displays in the list of available versions.
-
(Optional) When there are multiple versions of an application, you can compare the changes between them by clicking Diff releases in the right corner.
You can review changes between any two arbitrary releases by clicking the icon in the header of the release column. Select the two versions to compare, and click Diff releases to show the relative changes between the two releases.
-
(Optional) Click the View preflight checks icon to view or re-run the preflight checks.
-
Return to the Version History tab and click Deploy next to the target version.
Update the kURL Cluster
After updating the kURL installer spec, you can rerun the kURL installation script to update a kURL cluster. For more information about kURL cluster udpates, see About kURL Cluster Updates.
The Kubernetes scheduler automatically reschedules Pods to other nodes during maintenance. Any deployments or StatefulSets with a single replica experience downtime while being rescheduled.
Online Environments
To update the kURL cluster in an online environment:
-
Edit the kURL installer spec as desired. For example, update the version of Kubernetes or add, remove, or update add-ons. For more information, see Creating a kURL Installer.
-
Run the kURL installation script on any primary node in the cluster:
curl -sSL https://k8s.kurl.sh/APP_SLUG | sudo bash -s ADVANCED_OPTIONS
Replace:
-
APP_SLUG
with the unique slug for the application. -
ADVANCED_OPTIONS
optionally with any flags listed in Advanced Options in the kURL documentation.To use no advanced installation options, remove
-s ADVANCED_OPTIONS
from the command.See the following recommendations for advanced options:
-
installer-spec-file: If you used the
installer-spec-file
flag to pass apatch.yaml
file when you installed, you must pass the samepatch.yaml
file when you upgrade. This prevents the installer from overwriting any configuration from yourpatch.yaml
file and making changes to the add-ons in your cluster. For example:installer-spec-file="./patch.yaml"
. -
app-version-label: By default, the script also upgrades your application to the latest version when you run the installation script.
You can specify a target application version with the
app-version-label
flag. To avoid upgrading your application version, set theapp-version-label
flag to the currently installed application version. For example:app-version-label=1.5.0
.
-
-
-
(Kubernetes Upgrades Only) If a Kubernetes upgrade is required, the script automatically prints a
Drain local node and apply upgrade?
prompt. Confirm the prompt to drain the local primary node and apply the Kubernetes upgrade to the control plane.The script continues to drain and upgrade nodes sequentially. For each node, the script prints a command that you must run on the node to upgrade Kubernetes. For more information, see Kubernetes Updates above.
Air Gap Environments
For air gap installations, you must load images on each node in the cluster before you can run the installation script to update Kubernetes and any add-ons. This is because upgraded components might have Pods scheduled on any node in the cluster.
To update the kURL cluster in an air gap environment:
-
Edit the kURL installer spec as desired. For example, update the version of Kubernetes or add, remove, or update add-ons. For more information, see Creating a kURL Installer.
-
On each node in the cluster, download the kURL
.tar.gz
air gap bundle for the updated spec. See Download the kURL Bundle in Downloading Air Gap Bundles.Then, extract the contents:
tar -xvzf FILENAME.tar.gz
Replace
FILENAME
with the name of the downloaded kURL.tar.gz
air gap bundle. -
Run the following KURL script to ensure all required images are available:
cat tasks.sh | sudo bash -s load-images
noteThe kURL installation script that you will run in the next step also performs a check for required images and prompts you to run the
load-images
command if any images are missing. -
Run the kURL installation script on any primary node in the cluster with the
airgap
option:cat install.sh | sudo bash -s airgap OTHER_ADVANCED_OPTIONS
Replace
OTHER_ADVANCED_OPTIONS
optionally with any flags listed in Advanced Options in the kURL documentation.See the following recommendations for advanced options:
-
installer-spec-file: If you used the
installer-spec-file
flag to pass apatch.yaml
file when you installed, you must pass the samepatch.yaml
file when you upgrade. This prevents the installer from overwriting any configuration from yourpatch.yaml
file and making changes to the add-ons in your cluster. For example:installer-spec-file="./patch.yaml"
. -
app-version-label: By default, the script also upgrades your application to the latest version when you run the installation script.
You can specify a target application version with the
app-version-label
flag. To avoid upgrading your application version, set theapp-version-label
flag to the currently installed application version. For example:app-version-label=1.5.0
.
-
-
(Kubernetes Upgrades Only) If a Kubernetes upgrade is required, the script automatically prints a
Drain local node and apply upgrade?
prompt. Confirm the prompt to drain the local primary node and apply the Kubernetes upgrade to the control plane.The script continues to drain and upgrade nodes sequentially. For each node, the script prints a command that you must run on the node to upgrade Kubernetes. For more information, see Kubernetes Updates above.
noteIf Kubernetes must be upgraded by more than one minor version, the script automatically searches for the required Kubernetes assets in the
/var/lib/kurl/assets/
directory. If the assets are not available, the script prints a command to download the assets as atar.gz
package. Download and provide the absolute path to the package when prompted to continue with the upgrade.