Skip to content

Commit 08abbc0

Browse files
k6-operator: adjust installation instructions (#1981)
* feat(k6-operator): more precise installation instructions, esp. about stability * Apply suggestions from code review Co-authored-by: Heitor Tashiro Sergent <[email protected]> * feat(k6-operator): mirror installation changes to past k6 versions --------- Co-authored-by: Heitor Tashiro Sergent <[email protected]>
1 parent 87efcf8 commit 08abbc0

File tree

2 files changed

+78
-42
lines changed

2 files changed

+78
-42
lines changed

docs/sources/k6/next/set-up/set-up-distributed-k6/install-k6-operator.md

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To install k6 Operator, you'll need:
1616

1717
## Deploy the operator
1818

19-
There are three different options that you can use to deploy the k6 Operator.
19+
There are three different methods to deploy the k6 Operator. The first two methods, with bundle and Helm, install the latest official release of the k6 Operator by default. The third method installs from the branch of the [k6-operator repository](https://github.com/grafana/k6-operator) and is intended for development purposes or for users who have their own `kustomize` pipeline.
2020

2121
### Deploy with bundle
2222

@@ -50,27 +50,59 @@ You can find a complete list of Helm options in the [k6 Operator charts folder](
5050

5151
### Deploy with Makefile
5252

53-
In order to install the operator with a Makefile, you'll need:
53+
This method installs the k6 Operator from the GitHub repository, using the latest files in a branch. By default, it uses the `main` branch, which is not guaranteed to be stable at all times. This method is helpful for:
54+
55+
- Development purposes.
56+
- Users who have a `kustomize` pipeline and want to adjust manifests with it.
57+
58+
To use this method for production deployments, it's recommended to do that from the tagged commits:
59+
60+
```bash
61+
git clone https://github.com/grafana/k6-operator && cd k6-operator
62+
git checkout v0.0.22
63+
```
64+
65+
The tagged commits correspond to the official releases and are expected to be stable.
66+
67+
In order to install the operator with the Makefile, you need:
5468

5569
- [go](https://go.dev/doc/install)
5670
- [kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/)
5771

58-
A more manual, low-level way to install the k6 operator is by running the command below:
72+
Then, you can install the k6 Operator by running the command below from the root of the cloned repository:
5973

6074
```bash
6175
make deploy
6276
```
6377

64-
This method may be more useful for development of the k6 Operator, depending on specifics of the setup.
78+
### Install the CRDs
6579

66-
## Install the CRD
67-
68-
The k6 Operator includes custom resources called `TestRun`, `PrivateLoadZone`, and `K6`. They're automatically installed when you do a deployment or install a bundle, but you can also manually install them by running:
80+
The k6 Operator includes custom resources called `TestRun` and `PrivateLoadZone`. They're automatically installed when you use one of the three installation methods above. But you can also manually install the CRDs by running:
6981

7082
```bash
7183
make install
7284
```
7385

86+
## Uninstall k6 Operator
87+
88+
Removal of the k6 Operator depends on the installation method. If you use the bundle installation method, you can remove all of the resources created by the k6 Operator with the following:
89+
90+
```bash
91+
curl https://raw.githubusercontent.com/grafana/k6-operator/main/bundle.yaml | kubectl delete -f -
92+
```
93+
94+
If you use Helm installation, then removal should be done with the `helm` command:
95+
96+
```bash
97+
helm uninstall k6-operator
98+
```
99+
100+
Finally, if you use Makefile installation, use the `make` command to uninstall:
101+
102+
```bash
103+
make delete
104+
```
105+
74106
## Watch namespaces
75107

76108
By default, the k6 Operator watches the `TestRun` and `PrivateLoadZone` custom resources in all namespaces.
@@ -101,17 +133,3 @@ spec:
101133
# value: "some-ns,some-other-namespace"
102134
# ...
103135
```
104-
105-
## Uninstall k6 Operator
106-
107-
You can remove all of the resources created by the k6 Operator with `bundle`:
108-
109-
```bash
110-
curl https://raw.githubusercontent.com/grafana/k6-operator/main/bundle.yaml | kubectl delete -f -
111-
```
112-
113-
Or with the `make` command:
114-
115-
```bash
116-
make delete
117-
```

docs/sources/k6/v1.1.x/set-up/set-up-distributed-k6/install-k6-operator.md

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ To install k6 Operator, you'll need:
1616

1717
## Deploy the operator
1818

19-
There are three different options that you can use to deploy the k6 Operator.
19+
There are three different methods to deploy the k6 Operator. The first two methods, with bundle and Helm, install the latest official release of the k6 Operator by default. The third method installs from the branch of the [k6-operator repository](https://github.com/grafana/k6-operator) and is intended for development purposes or for users who have their own `kustomize` pipeline.
2020

2121
### Deploy with bundle
2222

@@ -50,27 +50,59 @@ You can find a complete list of Helm options in the [k6 Operator charts folder](
5050

5151
### Deploy with Makefile
5252

53-
In order to install the operator with a Makefile, you'll need:
53+
This method installs the k6 Operator from the GitHub repository, using the latest files in a branch. By default, it uses the `main` branch, which is not guaranteed to be stable at all times. This method is helpful for:
54+
55+
- Development purposes.
56+
- Users who have a `kustomize` pipeline and want to adjust manifests with it.
57+
58+
To use this method for production deployments, it's recommended to do that from the tagged commits:
59+
60+
```bash
61+
git clone https://github.com/grafana/k6-operator && cd k6-operator
62+
git checkout v0.0.22
63+
```
64+
65+
The tagged commits correspond to the official releases and are expected to be stable.
66+
67+
In order to install the operator with the Makefile, you need:
5468

5569
- [go](https://go.dev/doc/install)
5670
- [kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/)
5771

58-
A more manual, low-level way to install the k6 operator is by running the command below:
72+
Then, you can install the k6 Operator by running the command below from the root of the cloned repository:
5973

6074
```bash
6175
make deploy
6276
```
6377

64-
This method may be more useful for development of the k6 Operator, depending on specifics of the setup.
78+
### Install the CRDs
6579

66-
## Install the CRD
67-
68-
The k6 Operator includes custom resources called `TestRun`, `PrivateLoadZone`, and `K6`. They're automatically installed when you do a deployment or install a bundle, but you can also manually install them by running:
80+
The k6 Operator includes custom resources called `TestRun` and `PrivateLoadZone`. They're automatically installed when you use one of the three installation methods above. But you can also manually install the CRDs by running:
6981

7082
```bash
7183
make install
7284
```
7385

86+
## Uninstall k6 Operator
87+
88+
Removal of the k6 Operator depends on the installation method. If you use the bundle installation method, you can remove all of the resources created by the k6 Operator with the following:
89+
90+
```bash
91+
curl https://raw.githubusercontent.com/grafana/k6-operator/main/bundle.yaml | kubectl delete -f -
92+
```
93+
94+
If you use Helm installation, then removal should be done with the `helm` command:
95+
96+
```bash
97+
helm uninstall k6-operator
98+
```
99+
100+
Finally, if you use Makefile installation, use the `make` command to uninstall:
101+
102+
```bash
103+
make delete
104+
```
105+
74106
## Watch namespaces
75107

76108
By default, the k6 Operator watches the `TestRun` and `PrivateLoadZone` custom resources in all namespaces.
@@ -101,17 +133,3 @@ spec:
101133
# value: "some-ns,some-other-namespace"
102134
# ...
103135
```
104-
105-
## Uninstall k6 Operator
106-
107-
You can remove all of the resources created by the k6 Operator with `bundle`:
108-
109-
```bash
110-
curl https://raw.githubusercontent.com/grafana/k6-operator/main/bundle.yaml | kubectl delete -f -
111-
```
112-
113-
Or with the `make` command:
114-
115-
```bash
116-
make delete
117-
```

0 commit comments

Comments
 (0)