Skip to content

Commit ec5d76d

Browse files
docs: update Kubernetes Operator docs for v2.7.0 and v2.8.1 releases
1 parent 3f8e45c commit ec5d76d

5 files changed

Lines changed: 251 additions & 10 deletions

File tree

docs/changelog/operator.mdx

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,90 @@ rss: true
77

88
{/* GENERATED by scripts/generate-changelog.js — do not edit by hand. */}
99

10+
<Update label="2026-07-14" description="Kubernetes Operator v2.8.1">
11+
### Highlights
12+
13+
- **CRDs now ship as a Helm subchart** — the chart's CRDs (`RestateCluster`, `RestateDeployment`, `RestateCloudEnvironment`) ship via an optional `restate-operator-crds` subchart placed in Helm's native `crds/` directory. Installation is gated by the `installCrds` value (default `true`). Fresh installs get all three CRDs automatically. Set `installCrds: false` to manage CRDs out-of-band (GitOps, ArgoCD).
14+
15+
### CRD installation via Helm subchart
16+
17+
The chart now ships CRDs via a dedicated `restate-operator-crds` subchart. This resolves the longstanding issue of CRD ownership conflicts and simplifies upgrades.
18+
19+
- **Fresh installs**: CRDs are installed automatically by default.
20+
- **GitOps / out-of-band management**: Set `installCrds: false` to skip CRD installation.
21+
22+
```yaml
23+
# values.yaml
24+
installCrds: false # manage CRDs externally
25+
```
26+
27+
Upgrading from v2.7 and earlier is straightforward — existing CRDs are left untouched, no ownership adoption or `--take-ownership` step is needed:
28+
29+
```bash
30+
helm upgrade restate-operator restatedev/restate-operator --version 2.8.1
31+
```
32+
33+
**Note on CRD schema updates**: Helm's native `crds/` directory is install-only on upgrade (this is deliberate Helm behavior). To apply CRD schema changes on an existing install, apply the new CRDs explicitly or let a GitOps tool re-apply them:
34+
35+
```bash
36+
kubectl apply -f crd/restateclusters.yaml -f crd/restatedeployments.yaml -f crd/restatecloudenvironments.yaml
37+
```
38+
39+
[View on GitHub](https://github.com/restatedev/restate-operator/releases/tag/v2.8.1)
40+
</Update>
41+
1042
<Update label="2026-07-07" description="Kubernetes Operator v2.7.0">
11-
### What's Changed
12-
* chore(deps-dev): bump esbuild from 0.25.12 to 0.28.1 in /examples/services/greeter in the npm_and_yarn group across 1 directory by @dependabot[bot] in https://github.com/restatedev/restate-operator/pull/149
13-
* Align generated Pkl bindings; pin and fix the Pkl generator by @pcholakov in https://github.com/restatedev/restate-operator/pull/152
14-
* Release 2.7.0: RestateCluster pod lifecycle, sidecars, extra volumes by @pcholakov in https://github.com/restatedev/restate-operator/pull/156
43+
### Highlights
44+
45+
- **Pod lifecycle, sidecars, and extra volumes on `RestateCluster`** — five new optional `spec.compute` fields (`lifecycle`, `sidecars`, `terminationGracePeriodSeconds`, `extraVolumes`, `extraVolumeMounts`) are passed through to the StatefulSet pod template, enabling graceful-shutdown hooks, companion containers, and mounting reusable content next to Restate.
46+
47+
### Pod lifecycle, sidecars, termination grace period, and extra volumes
48+
49+
Five new optional fields on `RestateCluster` `spec.compute` pass through to the underlying StatefulSet pod template:
50+
51+
- `lifecycle` — container lifecycle hooks (`postStart` / `preStop`) for the Restate container.
52+
- `sidecars` — native sidecar containers that run alongside Restate (started before it, terminated after it). Requires Kubernetes 1.29+ (GA in 1.33).
53+
- `terminationGracePeriodSeconds` — overrides the pod termination grace period (previously hardcoded to 60 seconds).
54+
- `extraVolumes` — additional pod volumes alongside the operator-managed ones.
55+
- `extraVolumeMounts` — additional volume mounts for the Restate container.
56+
57+
These let you wire in graceful-shutdown hooks, run companion containers (log shippers, proxies, metrics exporters), and tune the shutdown window for your workload.
58+
59+
```yaml
60+
spec:
61+
compute:
62+
image: docker.restate.dev/restatedev/restate:latest
63+
terminationGracePeriodSeconds: 120
64+
extraVolumes:
65+
- name: hooks
66+
configMap:
67+
name: node-state-control
68+
defaultMode: 0755
69+
extraVolumeMounts:
70+
- name: hooks
71+
mountPath: /node-state-control
72+
readOnly: true
73+
lifecycle:
74+
preStop:
75+
exec:
76+
command: ["/bin/sh", "/node-state-control/pre-stop.sh"]
77+
sidecars:
78+
- name: log-shipper
79+
image: log-shipper:latest
80+
volumeMounts:
81+
- name: hooks
82+
mountPath: /node-state-control
83+
```
84+
85+
All five fields are optional — omitting them preserves previous behavior (no lifecycle hooks, no sidecars, no extra volumes, 60s grace period). Volume and mount name collisions with operator-managed resources are rejected at reconcile time with a clear error.
86+
87+
### Upgrading
88+
89+
Apply the updated CRDs and upgrade the operator via Helm:
90+
91+
```bash
92+
helm upgrade restate-operator restatedev/restate-operator --version 2.7.0
93+
```
1594

1695
[View on GitHub](https://github.com/restatedev/restate-operator/releases/tag/v2.7.0)
1796
</Update>

docs/server/deploy/kubernetes.mdx

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,78 @@ Both fields are propagated to the `StatefulSet` pod template and are merged with
154154

155155
This is useful for integrations that rely on pod-level metadata, such as GKE ComputeClass scheduling (cloud.google.com/compute-class), Vault agent injection, Datadog, Prometheus scraping, and custom scheduling constraints.
156156

157+
### Pod lifecycle hooks, sidecars, and extra volumes
158+
159+
`RestateCluster` `spec.compute` supports several optional fields for advanced pod configuration:
160+
161+
- `lifecycle` — container lifecycle hooks (`postStart` / `preStop`) for the Restate container.
162+
- `sidecars` — native sidecar containers that start before and stop after the Restate container (requires Kubernetes 1.29+).
163+
- `terminationGracePeriodSeconds` — overrides the pod termination grace period (default: 60s).
164+
- `extraVolumes` — additional pod volumes mounted alongside operator-managed volumes.
165+
- `extraVolumeMounts` — additional volume mounts on the Restate container.
166+
167+
These fields are useful for running log shippers, metrics exporters, or proxies alongside Restate, and for wiring graceful-shutdown scripts:
168+
169+
```yaml
170+
spec:
171+
compute:
172+
image: docker.restate.dev/restatedev/restate:latest
173+
terminationGracePeriodSeconds: 120
174+
extraVolumes:
175+
- name: hooks
176+
configMap:
177+
name: node-state-control
178+
defaultMode: 0755
179+
extraVolumeMounts:
180+
- name: hooks
181+
mountPath: /node-state-control
182+
readOnly: true
183+
lifecycle:
184+
preStop:
185+
exec:
186+
command: ["/bin/sh", "/node-state-control/pre-stop.sh"]
187+
sidecars:
188+
- name: log-shipper
189+
image: log-shipper:latest
190+
volumeMounts:
191+
- name: hooks
192+
mountPath: /node-state-control
193+
```
194+
195+
All five fields are optional. Volume and mount names that conflict with operator-managed resources are rejected at reconcile time with a clear error.
196+
197+
### Automatic cluster provisioning
198+
199+
Set `spec.cluster.autoProvision: true` to have the operator automatically provision the Restate cluster once the pods are running. This calls the gRPC `ProvisionCluster` API and tracks the result in `status.provisioned` to prevent repeated calls.
200+
201+
```yaml
202+
spec:
203+
cluster:
204+
autoProvision: true
205+
config: |
206+
# when using autoProvision, disable Restate's own auto-provision to avoid split brain
207+
auto-provision = false
208+
# ... rest of your config
209+
```
210+
211+
<Warning>
212+
When `cluster.autoProvision: true` is set, you must also set `auto-provision = false` in your Restate config to avoid a split-brain situation where both the operator and Restate try to provision the cluster simultaneously.
213+
</Warning>
214+
215+
### Trusted CA certificates
216+
217+
When Restate needs to call services that use a private certificate authority, you can configure custom trusted CA certificates via `spec.security.trustedCaCerts`:
218+
219+
```yaml
220+
spec:
221+
security:
222+
trustedCaCerts:
223+
- secretName: internal-ca
224+
key: ca.pem
225+
```
226+
227+
The operator adds an init container that merges your custom CAs with the system CA bundle and sets `SSL_CERT_FILE` on the Restate container.
228+
157229
## Helm Chart
158230

159231
For a more bare-bone deployment of a Restate cluster, you can use the Helm chart.

docs/services/deploy/kubernetes.mdx

Lines changed: 69 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,31 @@ The Restate Operator can help you connect your services to Restate Cloud by mana
7575
Or check out the [Restate Cloud documentation](/cloud/connecting-services#kubernetes-services) for more information.
7676
</Info>
7777

78-
### Automatic Service Versioning
78+
### In-process tunnel mode
79+
80+
For services running in private networks that need to connect to a Restate Cloud environment without inbound networking, set `spec.restate.tunnelMode: in-process`. With this mode, your pods hold their own outbound tunnel connections to Restate Cloud — for example using the `@restatedev/restate-sdk-tunnel` npm package — instead of being reached through the tunnel-client sidecar and each version's Service.
81+
82+
```yaml
83+
spec:
84+
restate:
85+
register:
86+
cloud: my-cloud-environment
87+
tunnelMode: in-process
88+
```
89+
90+
When `tunnelMode: in-process` is set, the operator injects these environment variables into every container:
91+
- `RESTATE_INPROC_TUNNEL_NAME` — the versioned name of the revision
92+
- `RESTATE_INPROC_ENVIRONMENT_ID` — the Restate Cloud environment ID
93+
- `RESTATE_INPROC_CLOUD_REGION` — the cloud region
94+
- `RESTATE_INPROC_SIGNING_PUBLIC_KEY` — for request verification
95+
96+
Mount your API key Secret and point `RESTATE_INPROC_AUTH_TOKEN_FILE` at it — this variable is reserved for your own Secret mount and is not injected by the operator.
97+
98+
<Note>
99+
In-process tunnel mode is not supported with Knative deployments.
100+
</Note>
101+
102+
### Automatic service versioning
79103
Versioning gets handled automatically by the operator by keeping old ReplicaSets around with an associated Service object so that in-flight invocations can drain against the old code versions.
80104

81105
Have a look at the [versioning documentation](/services/versioning#automatic-versioning-with-kubernetes-operator) to learn more.
@@ -151,9 +175,49 @@ Note that there is no need for routing to be sticky, because each invocation is
151175
No context is assumed to be sticky on the node.
152176
However, if you wish to do so, you can do sticky routing via the invocation ID in your request headers (`x-restate-invocation-id`).
153177

154-
## Knative Deployment
178+
## Knative deployment
179+
180+
Restate supports Knative Serving as a deployment target. Knative enables scale-to-zero when there are no in-flight invocations and automatically configures an L7 load balancer.
181+
182+
### Knative with the Restate Operator (recommended)
183+
184+
The Restate Operator supports Knative Serving as an alternative to ReplicaSet mode. This gives you the operator's automatic registration and versioning on top of Knative's autoscaling capabilities.
185+
186+
Set `spec.serving.knative: true` in your `RestateDeployment`:
187+
188+
```yaml
189+
apiVersion: restate.dev/v1beta1
190+
kind: RestateDeployment
191+
metadata:
192+
name: service
193+
spec:
194+
serving:
195+
knative: true
196+
restate:
197+
register:
198+
cluster: restate
199+
template:
200+
spec:
201+
containers:
202+
- name: service
203+
image: path.to/yourrepo:yourtag
204+
ports:
205+
- containerPort: 9080
206+
name: h2c
207+
```
208+
209+
**Tag-based versioning**: use the `tag` field to control whether a pod template change creates a new versioned revision or updates in place:
210+
- **Same tag**: updates are applied in-place (no new version, no drain cycle).
211+
- **Changed tag**: treated as a new version — old revision drains while new revision handles new requests.
212+
- **No tag**: auto-versioning (every pod template change creates a new version).
213+
214+
<Note>
215+
Knative Serving must be installed on the cluster. In-process tunnel mode (`tunnelMode: in-process`) is not supported with Knative deployments.
216+
</Note>
217+
218+
### Knative without the operator
155219

156-
Restate supports Knative services. Knative allows scaling to zero when there are no in-flight invocations and automatically configures an L7 load balancer. There are no special requirements to deploy a service deployment container with Knative:
220+
There are no special requirements to deploy a Restate service container with Knative directly:
157221

158222
```shell
159223
kn service create service-name --port h2c:9080 --image path.to/yourrepo:yourtag
@@ -176,9 +240,9 @@ spec:
176240
containerPort: 9080
177241
```
178242

179-
The service will be accessible at `http://<service-name>.<namespace>` but to handle [versioning](/services/configuration), it is preferable to register the new revision url like `http://<service-name>-0001.<namespace>` as part of your deployment workflow.
243+
The service will be accessible at `http://<service-name>.<namespace>`. To handle [versioning](/services/versioning), register the revision-specific URL (e.g. `http://<service-name>-0001.<namespace>`) as part of your deployment workflow.
180244

181-
By default Knative exposes the service through the Ingress. This is not required by Restate, and you can disable this behavior adding the argument `--cluster-local` to the aforementioned creation command.
245+
By default Knative exposes the service through the Ingress. This is not required by Restate, and you can disable this behavior by adding the `--cluster-local` argument to the creation command.
182246

183247
<Info>
184248
Learn more about deploying Restate services with Knative by reading this [blog post](https://www.restate.dev/blog/building-stateful-serverless-applications-with-knative-and-restate) and the [Golang example](https://github.com/restatedev/examples/tree/main/go/integrations/knative-go).

docs/services/versioning.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,30 @@ The operator handles the complete versioning lifecycle:
6262

6363
For complete examples and specifications, see [Restate Operator git repo](https://github.com/restatedev/restate-operator).
6464

65+
### Per-version autoscaling during drain
66+
67+
By default, draining versions hold their full replica count for the entire drain window, which can last hours for long-running workflows. To reduce compute cost during drains, add a `spec.autoscaling` block to your `RestateDeployment`. The operator creates a `HorizontalPodAutoscaler` per non-latest version while it is still active, and removes it once the version is fully drained.
68+
69+
```yaml
70+
spec:
71+
autoscaling:
72+
minReplicas: 1
73+
maxReplicas: 10
74+
metrics:
75+
- type: Resource
76+
resource:
77+
name: cpu
78+
target:
79+
type: Utilization
80+
averageUtilization: 70
81+
```
82+
83+
The `spec.autoscaling` block is optional. When omitted, draining versions stay at their full `replicas` count as before. The **latest** version is not covered here — use a separate HPA targeting the `RestateDeployment` scale subresource for the latest version.
84+
85+
<Note>
86+
Per-version autoscaling is only available in ReplicaSet mode. It is not supported in Knative mode, where Knative's own autoscaler manages scaling.
87+
</Note>
88+
6589
## Manual versioning
6690

6791
For non-FaaS deployments, you can use either the UI or the CLI to manage deployments. The typical update flow looks like this:

docs/snippets/common/install-restate-operator.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ Install the Restate Operator via Helm:
22

33
```bash
44
helm install restate-operator \
5-
oci://ghcr.io/restatedev/restate-operator-helm \
5+
restatedev/restate-operator \
66
--namespace restate-operator \
77
--create-namespace
88
```
99

10+
The Helm chart installs the CRDs (`RestateCluster`, `RestateDeployment`, `RestateCloudEnvironment`) automatically. To manage CRDs externally (GitOps / ArgoCD), set `installCrds: false` in your values.
11+
1012
To install the operator, you need to be able to create namespaces and CRDs.

0 commit comments

Comments
 (0)