Skip to content

Commit 18025ea

Browse files
feat(k6-operator): add upgrade guide (#2049)
* feat(k6-operator): add upgrade guide * Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent <[email protected]> * feat(k6-operator): mirror upgrade guide to prev k6 versions --------- Co-authored-by: Heitor Tashiro Sergent <[email protected]>
1 parent e5c082a commit 18025ea

File tree

4 files changed

+260
-20
lines changed

4 files changed

+260
-20
lines changed
Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,70 @@
11
---
22
weight: 200
3-
title: Upgrade k6 Operator
4-
_build:
5-
list: false
3+
title: Upgrade the k6 Operator
64
---
75

8-
# Upgrade k6 Operator
6+
# Upgrade the k6 Operator
97

10-
<!-- TODO: Add content -->
8+
This guide explains how to upgrade the k6 Operator, depending on your installation method. Before upgrading, make sure to read the [release notes](https://github.com/grafana/k6-operator/releases) to know what changed and if any breaking changes happened.
9+
10+
## k6 Operator installed with bundle
11+
12+
If you installed the k6 Operator with [bundle](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-bundle), you can usually upgrade by re-running the `kubectl apply` command with the latest bundle file. However, this won't remove resources that are no longer present in the new bundle. To avoid leaving outdated resources in your cluster, follow these steps:
13+
14+
1. Download the version of `bundle.yaml` you originally used and save it as `old.bundle.yaml`.
15+
1. Delete the old installation:
16+
17+
```sh
18+
kubectl -f old.bundle.yaml delete
19+
```
20+
21+
1. Download the latest bundle and install it:
22+
23+
```sh
24+
curl https://raw.githubusercontent.com/grafana/k6-operator/main/bundle.yaml > bundle.yaml
25+
kubectl apply -f bundle.yaml
26+
```
27+
28+
1. Save the latest bundle as your new `old.bundle.yaml` for future upgrades:
29+
30+
```sh
31+
cp bundle.yaml old.bundle.yaml
32+
```
33+
34+
{{< admonition type="note" >}}
35+
Always review the [release notes](https://github.com/grafana/k6-operator/releases) and compare the new `bundle.yaml` with your previous version before upgrading.
36+
{{< /admonition >}}
37+
38+
### Split the bundle for long-term maintenance
39+
40+
Bundle installation is quick, but not always flexible for long-term maintenance. You can split the bundle into separate manifest files and manage them with Kustomize or a GitOps workflow. For inspiration, refer to the [run-tests.sh script](https://github.com/grafana/k6-operator/blob/main/e2e/run-tests.sh) in the k6 Operator repository.
41+
42+
## k6 Operator installed with Helm
43+
44+
If you installed the k6 Operator with [Helm](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-helm), upgrade with these commands:
45+
46+
```sh
47+
helm repo update
48+
helm upgrade k6-operator grafana/k6-operator
49+
```
50+
51+
## k6 Operator installed with Makefile
52+
53+
If you installed the k6 Operator with a [Makefile](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-makefile), upgrade with these commands:
54+
55+
```sh
56+
git clone https://github.com/grafana/k6-operator && cd k6-operator
57+
git checkout <LATEST_RELEASE_TAG>
58+
59+
make deploy
60+
```
61+
62+
Replace `<LATEST_RELEASE_TAG>` with the latest release tag from the [k6 Operator releases](https://github.com/grafana/k6-operator/releases).
63+
64+
{{< admonition type="caution" >}}
65+
66+
Make sure to switch to the tagged commit before running `make deploy`. If you run `make deploy` from the latest commit of the `main` branch, you may end up with a broken installation, because the `main` branch isn't guaranteed to be stable.
67+
68+
{{< /admonition >}}
69+
70+
This method is similar to the [split bundle approach](#split-the-bundle-for-long-term-maintenance), but it's closer to development mode and requires Golang and Kustomize to be installed.
Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,70 @@
11
---
22
weight: 200
3-
title: Upgrade k6 Operator
4-
_build:
5-
list: false
3+
title: Upgrade the k6 Operator
64
---
75

8-
# Upgrade k6 Operator
6+
# Upgrade the k6 Operator
97

10-
<!-- TODO: Add content -->
8+
This guide explains how to upgrade the k6 Operator, depending on your installation method. Before upgrading, make sure to read the [release notes](https://github.com/grafana/k6-operator/releases) to know what changed and if any breaking changes happened.
9+
10+
## k6 Operator installed with bundle
11+
12+
If you installed the k6 Operator with [bundle](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-bundle), you can usually upgrade by re-running the `kubectl apply` command with the latest bundle file. However, this won't remove resources that are no longer present in the new bundle. To avoid leaving outdated resources in your cluster, follow these steps:
13+
14+
1. Download the version of `bundle.yaml` you originally used and save it as `old.bundle.yaml`.
15+
1. Delete the old installation:
16+
17+
```sh
18+
kubectl -f old.bundle.yaml delete
19+
```
20+
21+
1. Download the latest bundle and install it:
22+
23+
```sh
24+
curl https://raw.githubusercontent.com/grafana/k6-operator/main/bundle.yaml > bundle.yaml
25+
kubectl apply -f bundle.yaml
26+
```
27+
28+
1. Save the latest bundle as your new `old.bundle.yaml` for future upgrades:
29+
30+
```sh
31+
cp bundle.yaml old.bundle.yaml
32+
```
33+
34+
{{< admonition type="note" >}}
35+
Always review the [release notes](https://github.com/grafana/k6-operator/releases) and compare the new `bundle.yaml` with your previous version before upgrading.
36+
{{< /admonition >}}
37+
38+
### Split the bundle for long-term maintenance
39+
40+
Bundle installation is quick, but not always flexible for long-term maintenance. You can split the bundle into separate manifest files and manage them with Kustomize or a GitOps workflow. For inspiration, refer to the [run-tests.sh script](https://github.com/grafana/k6-operator/blob/main/e2e/run-tests.sh) in the k6 Operator repository.
41+
42+
## k6 Operator installed with Helm
43+
44+
If you installed the k6 Operator with [Helm](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-helm), upgrade with these commands:
45+
46+
```sh
47+
helm repo update
48+
helm upgrade k6-operator grafana/k6-operator
49+
```
50+
51+
## k6 Operator installed with Makefile
52+
53+
If you installed the k6 Operator with a [Makefile](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-makefile), upgrade with these commands:
54+
55+
```sh
56+
git clone https://github.com/grafana/k6-operator && cd k6-operator
57+
git checkout <LATEST_RELEASE_TAG>
58+
59+
make deploy
60+
```
61+
62+
Replace `<LATEST_RELEASE_TAG>` with the latest release tag from the [k6 Operator releases](https://github.com/grafana/k6-operator/releases).
63+
64+
{{< admonition type="caution" >}}
65+
66+
Make sure to switch to the tagged commit before running `make deploy`. If you run `make deploy` from the latest commit of the `main` branch, you may end up with a broken installation, because the `main` branch isn't guaranteed to be stable.
67+
68+
{{< /admonition >}}
69+
70+
This method is similar to the [split bundle approach](#split-the-bundle-for-long-term-maintenance), but it's closer to development mode and requires Golang and Kustomize to be installed.
Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,70 @@
11
---
22
weight: 200
3-
title: Upgrade k6 Operator
4-
_build:
5-
list: false
3+
title: Upgrade the k6 Operator
64
---
75

8-
# Upgrade k6 Operator
6+
# Upgrade the k6 Operator
97

10-
<!-- TODO: Add content -->
8+
This guide explains how to upgrade the k6 Operator, depending on your installation method. Before upgrading, make sure to read the [release notes](https://github.com/grafana/k6-operator/releases) to know what changed and if any breaking changes happened.
9+
10+
## k6 Operator installed with bundle
11+
12+
If you installed the k6 Operator with [bundle](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-bundle), you can usually upgrade by re-running the `kubectl apply` command with the latest bundle file. However, this won't remove resources that are no longer present in the new bundle. To avoid leaving outdated resources in your cluster, follow these steps:
13+
14+
1. Download the version of `bundle.yaml` you originally used and save it as `old.bundle.yaml`.
15+
1. Delete the old installation:
16+
17+
```sh
18+
kubectl -f old.bundle.yaml delete
19+
```
20+
21+
1. Download the latest bundle and install it:
22+
23+
```sh
24+
curl https://raw.githubusercontent.com/grafana/k6-operator/main/bundle.yaml > bundle.yaml
25+
kubectl apply -f bundle.yaml
26+
```
27+
28+
1. Save the latest bundle as your new `old.bundle.yaml` for future upgrades:
29+
30+
```sh
31+
cp bundle.yaml old.bundle.yaml
32+
```
33+
34+
{{< admonition type="note" >}}
35+
Always review the [release notes](https://github.com/grafana/k6-operator/releases) and compare the new `bundle.yaml` with your previous version before upgrading.
36+
{{< /admonition >}}
37+
38+
### Split the bundle for long-term maintenance
39+
40+
Bundle installation is quick, but not always flexible for long-term maintenance. You can split the bundle into separate manifest files and manage them with Kustomize or a GitOps workflow. For inspiration, refer to the [run-tests.sh script](https://github.com/grafana/k6-operator/blob/main/e2e/run-tests.sh) in the k6 Operator repository.
41+
42+
## k6 Operator installed with Helm
43+
44+
If you installed the k6 Operator with [Helm](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-helm), upgrade with these commands:
45+
46+
```sh
47+
helm repo update
48+
helm upgrade k6-operator grafana/k6-operator
49+
```
50+
51+
## k6 Operator installed with Makefile
52+
53+
If you installed the k6 Operator with a [Makefile](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-makefile), upgrade with these commands:
54+
55+
```sh
56+
git clone https://github.com/grafana/k6-operator && cd k6-operator
57+
git checkout <LATEST_RELEASE_TAG>
58+
59+
make deploy
60+
```
61+
62+
Replace `<LATEST_RELEASE_TAG>` with the latest release tag from the [k6 Operator releases](https://github.com/grafana/k6-operator/releases).
63+
64+
{{< admonition type="caution" >}}
65+
66+
Make sure to switch to the tagged commit before running `make deploy`. If you run `make deploy` from the latest commit of the `main` branch, you may end up with a broken installation, because the `main` branch isn't guaranteed to be stable.
67+
68+
{{< /admonition >}}
69+
70+
This method is similar to the [split bundle approach](#split-the-bundle-for-long-term-maintenance), but it's closer to development mode and requires Golang and Kustomize to be installed.
Lines changed: 65 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,70 @@
11
---
22
weight: 200
3-
title: Upgrade k6 Operator
4-
_build:
5-
list: false
3+
title: Upgrade the k6 Operator
64
---
75

8-
# Upgrade k6 Operator
6+
# Upgrade the k6 Operator
97

10-
<!-- TODO: Add content -->
8+
This guide explains how to upgrade the k6 Operator, depending on your installation method. Before upgrading, make sure to read the [release notes](https://github.com/grafana/k6-operator/releases) to know what changed and if any breaking changes happened.
9+
10+
## k6 Operator installed with bundle
11+
12+
If you installed the k6 Operator with [bundle](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-bundle), you can usually upgrade by re-running the `kubectl apply` command with the latest bundle file. However, this won't remove resources that are no longer present in the new bundle. To avoid leaving outdated resources in your cluster, follow these steps:
13+
14+
1. Download the version of `bundle.yaml` you originally used and save it as `old.bundle.yaml`.
15+
1. Delete the old installation:
16+
17+
```sh
18+
kubectl -f old.bundle.yaml delete
19+
```
20+
21+
1. Download the latest bundle and install it:
22+
23+
```sh
24+
curl https://raw.githubusercontent.com/grafana/k6-operator/main/bundle.yaml > bundle.yaml
25+
kubectl apply -f bundle.yaml
26+
```
27+
28+
1. Save the latest bundle as your new `old.bundle.yaml` for future upgrades:
29+
30+
```sh
31+
cp bundle.yaml old.bundle.yaml
32+
```
33+
34+
{{< admonition type="note" >}}
35+
Always review the [release notes](https://github.com/grafana/k6-operator/releases) and compare the new `bundle.yaml` with your previous version before upgrading.
36+
{{< /admonition >}}
37+
38+
### Split the bundle for long-term maintenance
39+
40+
Bundle installation is quick, but not always flexible for long-term maintenance. You can split the bundle into separate manifest files and manage them with Kustomize or a GitOps workflow. For inspiration, refer to the [run-tests.sh script](https://github.com/grafana/k6-operator/blob/main/e2e/run-tests.sh) in the k6 Operator repository.
41+
42+
## k6 Operator installed with Helm
43+
44+
If you installed the k6 Operator with [Helm](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-helm), upgrade with these commands:
45+
46+
```sh
47+
helm repo update
48+
helm upgrade k6-operator grafana/k6-operator
49+
```
50+
51+
## k6 Operator installed with Makefile
52+
53+
If you installed the k6 Operator with a [Makefile](https://grafana.com/docs/k6/<K6_VERSION>/set-up/set-up-distributed-k6/install-k6-operator/#deploy-with-makefile), upgrade with these commands:
54+
55+
```sh
56+
git clone https://github.com/grafana/k6-operator && cd k6-operator
57+
git checkout <LATEST_RELEASE_TAG>
58+
59+
make deploy
60+
```
61+
62+
Replace `<LATEST_RELEASE_TAG>` with the latest release tag from the [k6 Operator releases](https://github.com/grafana/k6-operator/releases).
63+
64+
{{< admonition type="caution" >}}
65+
66+
Make sure to switch to the tagged commit before running `make deploy`. If you run `make deploy` from the latest commit of the `main` branch, you may end up with a broken installation, because the `main` branch isn't guaranteed to be stable.
67+
68+
{{< /admonition >}}
69+
70+
This method is similar to the [split bundle approach](#split-the-bundle-for-long-term-maintenance), but it's closer to development mode and requires Golang and Kustomize to be installed.

0 commit comments

Comments
 (0)