You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maxUnavailable: 2# Example: do not disrupt more than 2 pods at the same time
181
+
# minAvailable: 50% # Example: make sure that at least 50% of pods are available
177
182
runtimeReadOnlyRootFilesystem: true # Optional: specify if the Mendix Runtime container should use a read-only root filesystem
178
183
```
179
184
@@ -235,6 +240,7 @@ You must make the following changes:
235
240
* **customPodLabels** - Specify additional pod labels. Avoid using labels that start with the `privatecloud.mendix.com/` prefix.
236
241
* **general** - Specify additional labels for all pods of the app.
237
242
* **deploymentStrategy** - Specify parameters for the deployment strategy. For more information, see the [reduced downtime deployment](/developerportal/deploy/private-cloud-reduced-downtime/#deployment-strategy-in-standalone) documentation.
243
+
* **podDisruptionBudget** - Specify parameters for the pod disruption budget. For more information, see the [reduced downtime deployment](/developerportal/deploy/private-cloud-reduced-downtime/#pod-disruption-budget-in-standalone) documentation.
238
244
* **runtimeReadOnlyRootFilesystem** - Specify if the Runtime container should mount the root filesystem in [read-only mode](/developerportal/deploy/private-cloud-cluster/#readonlyrootfs).
Copy file name to clipboardExpand all lines: content/en/docs/deployment/private-cloud/reduced-downtime-deployment.md
+37-12Lines changed: 37 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,15 @@ Starting from version 2.24.0, the Operator will automatically perform a Rolling
19
19
Versions 2.20.0 to 2.23.1 of the Operator had an option to manually enable a **PreferRolling** strategy. That is, the Operator tried to perform a rolling update whenever possible. If the Operator detected that a database schema update was needed, it switched to a Recreate strategy to perform a full restart. If the new version of the app had model changes, deploying it required a schema update. In that case, the Mendix on Kubernetes Operator automatically stopped all replicas of the app, causing downtime.
20
20
{{% /alert %}}
21
21
22
+
In addition Operator version 2.24.0 will automatically assign a PodDisruptionBudget to environments with 2 or more replicas.
23
+
Any environment with 2 or more replicas will be configured with a PodDisruptionBudget that ensures that no more than 1 replicas are stopped by Kubernetes when scaling down a cluster node or preparing an OS upgrade.
24
+
25
+
{{% alert color="info" %}}
26
+
Previous versions of the Operator didn't manage PodDisruptionBudgets.
27
+
Instead, any manually created PodDisruptionBudget would apply to a Mendix app.
28
+
If you're manually created PodDisruptionBudgets for an app, delete it and instead specify the PodDisruptionBudget parameters [in the MendixApp CR](#pod-disruption-budget-in-standalone).
29
+
{{% /alert %}}
30
+
22
31
## Prerequisites
23
32
24
33
## Prerequisites for Operator version 2.24.0 and higher{#prerequisites-2.24.0}
@@ -89,27 +98,43 @@ You can specify the following options:
89
98
For example, setting this to **50%** will switch all clients to the updated app version once 50% of all replicas are running the updated version. If not otherwise specified, 50% is used as the default value. This option is only used if the strategy **type** is set to **PreferRolling**.
90
99
* **rollingUpdate** - Specifies parameters for rolling updates if the Operator is able to perform the update without a restart. These parameters are used as Kubernetes [rollingUpdate](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment) parameters:
91
100
* **maxSurge** – Specifies an absolute or percentage value for how many additional replicas can be added during the deployment process. The default **0** value means that no additional replicas are added during the rollout process, and instead existing replicas are stopped to avoid using additional cluster resources.
92
-
* **maxUnavailable** – Specifies an absolute or percentage value for how many replicas can be stopped to be replaced with updated versions during the rollout process. The default **50%** value means that half of the replicas would be stopped during the update process. Lowering this value slows down the rollout process, but ensures that less replicas are stopped during the update process.
101
+
* **maxUnavailable** – Specifies an absolute or percentage value for how many replicas can be stopped to be replaced with updated versions during the rollout process. The default **1** value means that at most one replicas would be stopped during the update process. Increasing this value speeds up the rollout process, but can cause performance issues.
93
102
94
-
## Preventing Kubernetes Disruptions
103
+
## Configuring Pod Disruption Budget parameters in Standalone Environments {#pod-disruption-budget-in-standalone}
95
104
96
-
Kubernetes can stop an app's pods if needed to stop a node (to scale down and consolidate apps to run on fewer nodes), or perform a node update (for example, install CVE patches on the host OS). You can add a [PodDisruptionBudget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) to an app to ensure that Kubernetes only stops a limited number of an app's pods, and if necessary waits for replacement pods to become available.
105
+
Kubernetes can stop an app's pods if needed to stop a node (to scale down and consolidate apps to run on fewer nodes), or perform a node update (for example, install CVE patches on the host OS).
106
+
Starting from Mendix Operator version 2.24.0, you can specify parameters for a [PodDisruptionBudget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) of an app to ensure that Kubernetes only stops a limited number of an app's pods, and if necessary waits for replacement pods to become available.
97
107
98
-
To add a PodDisruptionBudget, create the following PodDisruptionBudget, replacing `<mendixapp-cr-name>` with your app's internal name (the MendixApp CR name):
108
+
To manually configure parameters for a PodDisruptionBudget, add the `podDisruptionBudget` section to your `MendixApp` CR, as in the following example:
99
109
100
110
```yaml
101
-
apiVersion: policy/v1
102
-
kind: PodDisruptionBudget
111
+
apiVersion: privatecloud.mendix.com/v1alpha1
112
+
kind: MendixApp
103
113
metadata:
104
-
name: <mendixapp-cr-name> # This should be updated to match the MenedixApp CR name
114
+
# ...
115
+
# omitted lines for brevity
116
+
# ...
105
117
spec:
106
-
maxUnavailable: 1 # Ensure that at most 1 replica is stopped by Kubernetes
107
-
selector:
108
-
matchLabels:
109
-
privatecloud.mendix.com/app: <mendixapp-cr-name> # This should be updated to match the MenedixApp CR name
110
-
privatecloud.mendix.com/component: mendix-app
118
+
# ...
119
+
# omitted lines for brevity
120
+
# ...
121
+
# Add or update this section:
122
+
podDisruptionBudget:
123
+
# Kubernetes doesn't allow specifying both maxUnavailable and minAvailable at the same time:
maxUnavailable: 1 # Example: do not disrupt more than 1 pod at the same time
126
+
# minAvailable: 50% # Example: make sure that at least 50% of pods are available
111
127
```
112
128
129
+
You can specify the following options:
130
+
131
+
* **maxUnavailable** – Specifies an absolute or percentage value for how many replicas can be stopped if Kubernetes needs to evict them from a node. The default **1** value means that at most 1 replica can be stopped, and that Kubernetes needs to wait until a replacement replica becomes available. Increasing this value speeds up the rollout process, but can cause performance issues.
132
+
* **minAvailable** – Specifies an absolute or percentage value for how many replicas need to be remain available if Kubernetes needs to evict them from a node. Increasing this value slows down the rollout process, but ensures that less replicas can be disrupted.
133
+
134
+
{{% alert color="warning" %}}
135
+
Kubernetes doesn't allow specifying values for both `maxUnavailable` and `minAvailable`, and specifying values for both of them will [result in an error](https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget).
136
+
{{% /alert %}}
137
+
113
138
## Limitations
114
139
115
140
* This feature is only supported by Mendix Operator version 2.24 (and later). Mendix Operator versions 2.20.0 to 2.23.1 used to have an experimental implementation of this feature; upgrading to 2.24.0 or later is highly recommended.
Copy file name to clipboardExpand all lines: content/en/docs/releasenotes/deployment/mendix-for-private-cloud.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ For information on the current status of deployment to Mendix on Kubernetes and
18
18
19
19
* We've simplified the approach of handling Rolling updates by the Operator. Any app with 2 or more replicas will be updated without downtime, as long as the app is running the same MDA and base OS image.
20
20
* Starting from this version, all Operator upgrades will run without causing downtime (in environments that 2 or more replicas).
21
+
* The Mendix Operator will now manage PodDisruptionBudgets. For apps that have 2 or more replicas, a PodDisruptionBudget will be automatically created, so that cluster OS upgrades and scaling down nodes will happen in a controlled way, without causing disruption or downtime.
22
+
* We've added a fallback license for Connected environments using Subscription Secrets. If an environment fails to communicate with the licensing server, it will use the fallback license instead of switching into Trial mode.
21
23
* We have updated documentation that Kubernetes 1.34 is supported by the Mendix Operator.
22
24
* We've made a few adjustments to support changes in upcoming Studio Pro version numbers.
0 commit comments