Skip to content

Commit

Permalink
Extend kgs update / upgrade cluster for CAPI cluster (#2337)
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Sommer <[email protected]>
Co-authored-by: Fernando Ripoll <[email protected]>
  • Loading branch information
3 people authored Nov 29, 2024
1 parent 4e87137 commit 538f870
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions src/content/reference/kubectl-gs/update-cluster.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
linkTitle: update cluster
title: "'kubectl gs update cluster' command reference"
title: "'kubectl gs update cluster' command reference (cluster upgrades)"
description: Reference documentation on how to upgrade a workload cluster using kubectl-gs.
weight: 130
menu:
principal:
parent: reference-kubectlgs
identifier: reference-kubectlgs-updatecluster
last_review_date: 2024-11-25
last_review_date: 2024-11-28
owner:
- https://github.com/orgs/giantswarm/teams/team-phoenix
user_questions:
Expand All @@ -21,12 +21,39 @@ This command's purpose is to modify details of a workload cluster. Currently it

## Usage

### Upgrading a workload cluster {#cluster-upgrade}
### Upgrading a workload cluster {#cluster-upgrade} for CAPI cluster

**Note:** This feature is currently only working when the cluster configuration is **not stored** via GitOps.

Upgrades can either be triggered immediately, or the upgrade can be scheduled to happen at a specific date and time.

The following example shows how to upgrade a workload cluster to the release specified via the `--release-version` flag.

```nohighlight
kubectl gs update cluster \
--provider capa \
--namespace org-acme \
--name a1b2c \
--release-version 26.2.0
```

To schedule a workload cluster upgrade in the future, the `--scheduled-time` flag is used, like in the example below:

```nohighlight
kubectl-gs update cluster \
--provider capa \
--name a1b2c \
--namespace org-acme \
--release-version 29.0.0
--scheduled-time "2024-08-28 12:10"
```

This adds annotations to the cluster resource, triggering the upgrade to the specified version at the scheduled time.

### Upgrading a workload cluster {#cluster-upgrade} for Vintage cluster

To upgrade a workload cluster immediately, use the following command:

```nohighlight
kubectl gs update cluster \
--provider aws \
Expand All @@ -48,11 +75,9 @@ kubectl gs update cluster \
--scheduled-time "2022-01-01 02:00"
```

This adds annotations to the cluster resource, triggering the upgrade to the specified version at the scheduled time.

## Flags

- `--provider` - The infrastructure provider of the installation, either `aws` or `azure`.
- `--provider` - The infrastructure provider of the installation, `aws` or `azure` for Vintage cluster, `capa`, `capz`, `vsphere` or `cloud-director` for CAPI cluster.
- `--name` - Name of the cluster.
- `--namespace` - Namespace of the cluster resource.
- `--release-version` - Version of the release the cluster should be upgraded to.
Expand Down

0 comments on commit 538f870

Please sign in to comment.