Skip to content

Commit 5ad5cbb

Browse files
committed
Operator docs v1.3.1
Version 1.3.0 is totally broken, due to the "support helm install --skip-crds" change, which is revoked for version 1.3.1. Also, upon further inspection, there were various parts of the docs for all existing versions that were just plain wrong. - The `Three Node Secure Cluster (using LetsEncrypt)` example has never worked. LetsEncrypt won't issue certificates for service names and the operator doesn't yet support any other way for nodes to connect to each other. I replaced the broken examples with a note about the recommended workaround. If we can't fix the three node letsencrypt problem soon then we should publish an example of the workaround at least. - The helm instructions were silent about the catastrophic data loss that could occur if you messed with crds.enabled the wrong way. - The installation instructions claim that by removing the --set=crds.enabled=true flag that CRDs would not be installed, except the default value of crds.enabled is also true, so that isn't correct. - The helm upgrade instructions did not include --reuse-values or --reset-then-reuse-values, but they did include a --set, which means helm would default to --reset-values, which means all values set during installation would be discarded. The instructions falsely claimed that values set during installation would be preserved.
1 parent 650633a commit 5ad5cbb

31 files changed

+119
-389
lines changed

docs/server/kubernetes-operator/v1.0.0/getting-started/installation.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ To get the best out of this guide, a basic understanding of [Kubernetes concepts
1616
:::
1717

1818
* A Kubernetes cluster running `v1.23.1` or later.
19-
* Permission to create resources, deploy the Operator and install CRDs in the target cluster.
20-
* The following CLI tools installed, on your shell’s `$PATH`, with `$KUBECONFIG` pointing to your cluster:
19+
* Permission to create resources, deploy the Operator and install CRDs in the target cluster.
20+
* The following CLI tools installed, on your shell’s `$PATH`, with `$KUBECONFIG` pointing to your cluster:
2121
* kubectl [install guide](https://kubernetes.io/docs/tasks/tools/install-kubectl)
2222
* k9s [install guide](https://k9scli.io/topics/install/)
2323
* Helm 3 CLI [install guide](https://helm.sh/docs/intro/install/)
@@ -53,22 +53,34 @@ If you prefer to install CRDs yourself:
5353
```bash
5454
# Download the kurrentdb-operator Helm chart
5555
helm pull kurrent-latest/kurrentdb-operator --version 1.0.0 --untar
56-
# Install the CRDs
57-
kubectl apply -f kurrentdb-operator/templates/crds
56+
# Install the CRDs (real license data is not needed at this step)
57+
helm template -s 'templates/crds/*.yaml' kurrentdb-operator \
58+
--set operator.license.file= --set operator.license.key= \
59+
| kubectl apply -f -
5860
```
5961
*Expected Output*:
6062
```
6163
customresourcedefinition.apiextensions.k8s.io/kurrentdbbackups.kubernetes.kurrent.io created
6264
customresourcedefinition.apiextensions.k8s.io/kurrentdbs.kubernetes.kurrent.io created
6365
```
6466

67+
After installing CRDs manually, you should include the `--set crds.enabled=false` flag for the `helm
68+
install` command, and include one of `--set crds.enabled=false`, `--reuse-values`, or
69+
`--reset-then-reuse-values` for the `helm upgrade` command.
70+
71+
::: caution
72+
If `crds.enabled` transitions from `true` to `false` during an upgrade or rollback, the CRDs will be
73+
removed from the cluster, deleting all `KurrentDBs` and `KurrentDBBackups` and their associated
74+
child resources, including the PVCs and VolumeSnapshots containing your data!
75+
:::
76+
6577
## Deployment Modes
6678

6779
The Operator can be scoped to track Kurrent resources across **all** or **specific** namespaces.
6880

6981
### Cluster-wide
7082

71-
In cluster-wide mode, the Operator tracks Kurrent resources across **all** namespaces and requires `ClusterRole`. Helm creates the ClusteRole automatically.
83+
In cluster-wide mode, the Operator tracks Kurrent resources across **all** namespaces and requires `ClusterRole`. Helm creates the `ClusterRole` automatically.
7284

7385
To deploy the Operator in this mode, run:
7486

@@ -82,11 +94,11 @@ helm install kurrentdb-operator kurrent-latest/kurrentdb-operator \
8294
--set-file operator.license.file=/path/to/license.lic
8395
```
8496

85-
This command:
86-
- Deploys the Operator into the `kurrent` namespace (use `--create-namespace` to create it). Feel free to modify this namespace.
97+
This command:
98+
- Deploys the Operator into the `kurrent` namespace (use `--create-namespace` to create it). Feel free to modify this namespace.
8799
- Creates the namespace (if it already exists, leave out the `--create-namespace` flag)
88-
- Deploys CRDs (this can be skipped by removing `--set crds.enabled=true`)
89-
- Applys the Operator license
100+
- Deploys CRDs (this can be skipped by changing to `--set crds.enabled=false`)
101+
- Applies the Operator license
90102
- Deploys a new Helm release called `kurrentdb-operator` in the `kurrent` namespace.
91103

92104
*Expected Output*:
@@ -121,7 +133,7 @@ helm install kurrentdb-operator kurrent-latest/kurrentdb-operator \
121133
Here's what the command does:
122134
- Sets the namespace of where the Operator will be deployed i.e. `kurrent` (feel free to change this)
123135
- Creates the namespace (if it already exists, leave out the `--create-namespace` flag)
124-
- Deploys CRDs (this can be skipped by removing `--set crds.enabled=true`)
136+
- Deploys CRDs (this can be skipped by changing to `--set crds.enabled=false`)
125137
- Configures the Operator license
126138
- Sets the underlying Operator configuration to target the namespaces: `kurrent` and `foo`
127139
- Deploys a new Helm release called `kurrentdb-operator` in the `kurrent` namespace
@@ -174,4 +186,4 @@ Pods may also be viewed using the `:pods` command, for example:
174186

175187
Pressing the `Return` key on the selected Operator pod will allow you to drill through the container hosted in the pod, and then finally to the logs:
176188

177-
![Operator Logs](images/install/logs.png)
189+
![Operator Logs](images/install/logs.png)

docs/server/kubernetes-operator/v1.0.0/operations/database-deployment.md

Lines changed: 7 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -379,89 +379,12 @@ kubectl apply -f cluster.yaml
379379

380380
## Three Node Secure Cluster (using LetsEncrypt)
381381

382-
The following `KurrentDB` resource type defines a three node cluster with the following properties:
383-
- The database will be deployed in the `kurrent` namespace with the name `kurrentdb-cluster`
384-
- Security is enabled using certificates from LetsEncrypt
385-
- KurrentDB version 25.0.0 will be used
386-
- 1vcpu will be requested as the minimum (upper bound is unlimited) per node
387-
- 1gb of memory will be used per node
388-
- 512mb of storage will be allocated for the data disk per node
389-
- The KurrentDB instance that is provisioned will be exposed as `kurrentdb-{idx}.kurrentdb-cluster.kurrent.test`
390-
391-
```yaml
392-
apiVersion: cert-manager.io/v1
393-
kind: Certificate
394-
metadata:
395-
name: kurrentdb-cluster
396-
namespace: kurrent
397-
spec:
398-
secretName: kurrentdb-cluster-tls
399-
isCA: false
400-
usages:
401-
- client auth
402-
- server auth
403-
- digital signature
404-
- key encipherment
405-
commonName: kurrentdb-node
406-
subject:
407-
organizations:
408-
- Kurrent
409-
organizationalUnits:
410-
- Cloud
411-
dnsNames:
412-
- '*.kurrentdb-cluster.kurrent.svc.cluster.local'
413-
- '*.kurrentdb-cluster.kurrent.test'
414-
privateKey:
415-
algorithm: RSA
416-
encoding: PKCS1
417-
size: 2048
418-
issuerRef:
419-
name: letsencrypt
420-
kind: Issuer
421-
---
422-
apiVersion: kubernetes.kurrent.io/v1
423-
kind: KurrentDB
424-
metadata:
425-
name: kurrentdb-cluster
426-
namespace: kurrent
427-
spec:
428-
replicas: 3
429-
image: docker.kurrent.io/kurrent-latest/kurrentdb:25.0.0
430-
resources:
431-
requests:
432-
cpu: 1000m
433-
memory: 1Gi
434-
storage:
435-
volumeMode: "Filesystem"
436-
accessModes:
437-
- ReadWriteOnce
438-
resources:
439-
requests:
440-
storage: 512Mi
441-
network:
442-
domain: kurrentdb-cluster.kurrent.test
443-
loadBalancer:
444-
enabled: true
445-
security:
446-
certificateSecret:
447-
name: kurrentdb-cluster-tls
448-
keyName: tls.crt
449-
privateKeyName: tls.key
450-
```
451-
452-
Before deploying this cluster, ensure that the steps described in section [Using LetsEncrypt certificates](managing-certificates.md#using-trusted-certificates-via-letsencrypt) have been followed.
453-
454-
Follow these steps to deploy the cluster:
455-
- Copy the YAML snippet above to a file called `cluster.yaml`
456-
- Ensure that the `kurrent` namespace has been created
457-
- Run the following command:
458-
459-
```bash
460-
kubectl apply -f cluster.yaml
461-
```
462-
463-
Once deployed, navigate to the [Viewing Deployments](#viewing-deployments) section.
382+
Using LetsEncrypt, or any publicly trusted certificate, in an operator-managed KurrentDB cluster
383+
is not supported.
464384

385+
The recommended workaround is to combine [self-signed certificates within the cluster](
386+
#three-node-secure-cluster-using-self-signed-certificates) with an Ingress that does TLS
387+
termination using the LetsEncrypt certificate.
465388

466389
## Viewing Deployments
467390

@@ -488,7 +411,7 @@ Scrolling further will also show the events related to the deployment, such as:
488411

489412
### External
490413

491-
The Operator will create services of type `LoadBalancer` to access a KurrentDB cluster (for each node) when the `spec.network.loadBalancer.enabled` flag is set to `true`.
414+
The Operator will create services of type `LoadBalancer` to access a KurrentDB cluster (for each node) when the `spec.network.loadBalancer.enabled` flag is set to `true`.
492415

493416
Each service is annotated with `external-dns.alpha.kubernetes.io/hostname: {external cluster endpoint}` to allow the third-party tool [ExternalDNS](https://github.com/kubernetes-sigs/external-dns) to configure external access.
494417

@@ -580,4 +503,4 @@ kubectl -n kurrent patch kurrentdb kurrentdb-cluster --type=merge -p '{"spec":{"
580503

581504
```bash
582505
kubectl -n kurrent patch kurrentdb kurrentdb-cluster --type=merge -p '{"spec":{"configuration": {"ProjectionsLevel": "all", "StartStandardProjections": "true"}}}'
583-
```
506+
```

docs/server/kubernetes-operator/v1.0.0/operations/operator-upgrade.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ helm repo update
2626
helm upgrade kurrentdb-operator kurrentdb-operator-repo/kurrentdb-operator \
2727
--version {version} \
2828
--namespace kurrent \
29-
--set enable.crds=true
29+
--reset-then-reuse-values
3030
```
3131

3232
Here's what the command does:
3333
- Refreshes the local Helm repository index
3434
- Defines where Operator is installed i.e. `kurrent` (feel free to change this)
3535
- Define the upgrade `{version}` version e.g. 1.1.0
36-
- Deploys CRDs (this can be skipped by removing `--set crds.enabled=true`)
3736
- Performs the upgrade (leverages existing release values)

docs/server/kubernetes-operator/v1.1.0/getting-started/installation.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ To get the best out of this guide, a basic understanding of [Kubernetes concepts
1616
:::
1717

1818
* A Kubernetes cluster running `v1.23.1` or later.
19-
* Permission to create resources, deploy the Operator and install CRDs in the target cluster.
20-
* The following CLI tools installed, on your shell’s `$PATH`, with `$KUBECONFIG` pointing to your cluster:
19+
* Permission to create resources, deploy the Operator and install CRDs in the target cluster.
20+
* The following CLI tools installed, on your shell’s `$PATH`, with `$KUBECONFIG` pointing to your cluster:
2121
* kubectl [install guide](https://kubernetes.io/docs/tasks/tools/install-kubectl)
2222
* k9s [install guide](https://k9scli.io/topics/install/)
2323
* Helm 3 CLI [install guide](https://helm.sh/docs/intro/install/)
@@ -54,21 +54,31 @@ If you prefer to install CRDs yourself:
5454
# Download the kurrentdb-operator Helm chart
5555
helm pull kurrent-latest/kurrentdb-operator --version 1.1.0 --untar
5656
# Install the CRDs
57-
kubectl apply -f kurrentdb-operator/templates/crds
57+
helm template -s 'templates/crds/*.yaml' kurrentdb-operator | kubectl apply -f -
5858
```
5959
*Expected Output*:
6060
```
6161
customresourcedefinition.apiextensions.k8s.io/kurrentdbbackups.kubernetes.kurrent.io created
6262
customresourcedefinition.apiextensions.k8s.io/kurrentdbs.kubernetes.kurrent.io created
6363
```
6464

65+
After installing CRDs manually, you should include the `--set crds.enabled=false` flag for the `helm
66+
install` command, and include one of `--set crds.enabled=false`, `--reuse-values`, or
67+
`--reset-then-reuse-values` for the `helm upgrade` command.
68+
69+
::: caution
70+
If `crds.enabled` transitions from `true` to `false` during an upgrade or rollback, the CRDs will be
71+
removed from the cluster, deleting all `KurrentDBs` and `KurrentDBBackups` and their associated
72+
child resources, including the PVCs and VolumeSnapshots containing your data!
73+
:::
74+
6575
## Deployment Modes
6676

6777
The Operator can be scoped to track Kurrent resources across **all** or **specific** namespaces.
6878

6979
### Cluster-wide
7080

71-
In cluster-wide mode, the Operator tracks Kurrent resources across **all** namespaces and requires `ClusterRole`. Helm creates the ClusteRole automatically.
81+
In cluster-wide mode, the Operator tracks Kurrent resources across **all** namespaces and requires `ClusterRole`. Helm creates the `ClusterRole` automatically.
7282

7383
To deploy the Operator in this mode, run:
7484

@@ -82,11 +92,11 @@ helm install kurrentdb-operator kurrent-latest/kurrentdb-operator \
8292
--set-file operator.license.file=/path/to/license.lic
8393
```
8494

85-
This command:
86-
- Deploys the Operator into the `kurrent` namespace (use `--create-namespace` to create it). Feel free to modify this namespace.
95+
This command:
96+
- Deploys the Operator into the `kurrent` namespace (use `--create-namespace` to create it). Feel free to modify this namespace.
8797
- Creates the namespace (if it already exists, leave out the `--create-namespace` flag)
88-
- Deploys CRDs (this can be skipped by removing `--set crds.enabled=true`)
89-
- Applys the Operator license
98+
- Deploys CRDs (this can be skipped by changing to `--set crds.enabled=false`)
99+
- Applies the Operator license
90100
- Deploys a new Helm release called `kurrentdb-operator` in the `kurrent` namespace.
91101

92102
*Expected Output*:
@@ -121,7 +131,7 @@ helm install kurrentdb-operator kurrent-latest/kurrentdb-operator \
121131
Here's what the command does:
122132
- Sets the namespace of where the Operator will be deployed i.e. `kurrent` (feel free to change this)
123133
- Creates the namespace (if it already exists, leave out the `--create-namespace` flag)
124-
- Deploys CRDs (this can be skipped by removing `--set crds.enabled=true`)
134+
- Deploys CRDs (this can be skipped by changing to `--set crds.enabled=false`)
125135
- Configures the Operator license
126136
- Sets the underlying Operator configuration to target the namespaces: `kurrent` and `foo`
127137
- Deploys a new Helm release called `kurrentdb-operator` in the `kurrent` namespace

docs/server/kubernetes-operator/v1.1.0/operations/database-deployment.md

Lines changed: 5 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -444,91 +444,12 @@ kubectl apply -f cluster.yaml
444444

445445
## Three Node Secure Cluster (using LetsEncrypt)
446446

447-
The following `KurrentDB` resource type defines a three node cluster with the following properties:
448-
- The database will be deployed in the `kurrent` namespace with the name `kurrentdb-cluster`
449-
- Security is enabled using certificates from LetsEncrypt
450-
- KurrentDB version 25.0.0 will be used
451-
- 1vcpu will be requested as the minimum (upper bound is unlimited) per node
452-
- 1gb of memory will be used per node
453-
- 512mb of storage will be allocated for the data disk per node
454-
- The KurrentDB instance that is provisioned will be exposed as `kurrentdb-{idx}.kurrentdb-cluster.kurrent.test`
455-
456-
```yaml
457-
apiVersion: cert-manager.io/v1
458-
kind: Certificate
459-
metadata:
460-
name: kurrentdb-cluster
461-
namespace: kurrent
462-
spec:
463-
secretName: kurrentdb-cluster-tls
464-
isCA: false
465-
usages:
466-
- client auth
467-
- server auth
468-
- digital signature
469-
- key encipherment
470-
commonName: kurrentdb-node
471-
subject:
472-
organizations:
473-
- Kurrent
474-
organizationalUnits:
475-
- Cloud
476-
dnsNames:
477-
- '*.kurrentdb-cluster.kurrent.svc.cluster.local'
478-
- '*.kurrentdb-cluster.kurrent.test'
479-
- '*.kurrentdb-cluster-replica.kurrent.svc.cluster.local'
480-
- '*.kurrentdb-cluster-replica.kurrent.test'
481-
privateKey:
482-
algorithm: RSA
483-
encoding: PKCS1
484-
size: 2048
485-
issuerRef:
486-
name: letsencrypt
487-
kind: Issuer
488-
---
489-
apiVersion: kubernetes.kurrent.io/v1
490-
kind: KurrentDB
491-
metadata:
492-
name: kurrentdb-cluster
493-
namespace: kurrent
494-
spec:
495-
replicas: 3
496-
image: docker.kurrent.io/kurrent-latest/kurrentdb:25.0.0
497-
resources:
498-
requests:
499-
cpu: 1000m
500-
memory: 1Gi
501-
storage:
502-
volumeMode: "Filesystem"
503-
accessModes:
504-
- ReadWriteOnce
505-
resources:
506-
requests:
507-
storage: 512Mi
508-
network:
509-
domain: kurrentdb-cluster.kurrent.test
510-
loadBalancer:
511-
enabled: true
512-
security:
513-
certificateSecret:
514-
name: kurrentdb-cluster-tls
515-
keyName: tls.crt
516-
privateKeyName: tls.key
517-
```
518-
519-
Before deploying this cluster, ensure that the steps described in section [Using LetsEncrypt certificates](managing-certificates.md#using-trusted-certificates-via-letsencrypt) have been followed.
520-
521-
Follow these steps to deploy the cluster:
522-
- Copy the YAML snippet above to a file called `cluster.yaml`
523-
- Ensure that the `kurrent` namespace has been created
524-
- Run the following command:
525-
526-
```bash
527-
kubectl apply -f cluster.yaml
528-
```
529-
530-
Once deployed, navigate to the [Viewing Deployments](#viewing-deployments) section.
447+
Using LetsEncrypt, or any publicly trusted certificate, in an operator-managed KurrentDB cluster
448+
is not supported.
531449

450+
The recommended workaround is to combine [self-signed certificates within the cluster](
451+
#three-node-secure-cluster-using-self-signed-certificates) with an Ingress that does TLS
452+
termination using the LetsEncrypt certificate.
532453

533454
## Deploying With Scheduling Constraints
534455

docs/server/kubernetes-operator/v1.1.0/operations/operator-upgrade.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ helm repo update
2626
helm upgrade kurrentdb-operator kurrentdb-operator-repo/kurrentdb-operator \
2727
--version {version} \
2828
--namespace kurrent \
29-
--set enable.crds=true
29+
--reset-then-reuse-values
3030
```
3131

3232
Here's what the command does:
3333
- Refreshes the local Helm repository index
3434
- Defines where Operator is installed i.e. `kurrent` (feel free to change this)
3535
- Define the upgrade `{version}` version e.g. 1.1.0
36-
- Deploys CRDs (this can be skipped by removing `--set crds.enabled=true`)
3736
- Performs the upgrade (leverages existing release values)

0 commit comments

Comments
 (0)