Introduction
This article explains how to meet Kubernetes scheduling requirements (for example, taints and tolerations, and nodeSelector) for Mendix for Private Cloud deployments when these settings cannot be configured in the MendixApp Custom Resource (CR).
Environment
Applications hosted in Mendix on Kubernetes (Mendix for Private Cloud)
Instructions/Procedure
Supported Scheduling Features (Operator v2.14.0+)
Starting with Mendix Operator v2.14.0 and later versions, the following scheduling settings can be configured directly through the MendixApp Custom Resource:
- topologySpreadConstraints (Operator v2.14.0+) - Control pod distribution across zones or nodes
- nodeSelector (Operator v2.27.0+) - Schedule pods onto specific nodes using customPodNodeSelector.general
Unsupported Scheduling Features - Workarounds Required
Scheduling settings such as affinity and tolerations cannot be configured through the MendixApp CR in Mendix for Private Cloud. Use one of the following approaches to enforce scheduling:
- Enforce scheduling at the namespace level - Configure the cluster so that pods created in the target namespace are scheduled onto the intended nodes.
- Inject scheduling settings using an admission controller - Configure a mutating admission controller (for example, Kyverno) scoped to the target namespace to inject the required scheduling configuration (for example, tolerations and affinity) into pods created in that namespace.
Outcome
Mendix Runtime pods are scheduled onto the intended nodes, including nodes with taints such as environment=qa:NoSchedule.
Internal information related
- 274527, 216849
- DES-7361
Additional information
Mendix documentation:
- Using Command Line to Deploy a Mendix App to a Mendix on Kubernetes Cluster
- Creating a Private Cloud Cluster
- Mendix on Kubernetes Release Notes - Operator v2.27.0
Other documentation: Force pods in a specific namespace to schedule on defined nodes with Kubernetes
0 Comments