Hi, venkateshwarrao pakanati
To increase memory for build pods and avoid Out Of Memory (OOM) errors during deployments on a private cloud, you can follow these steps:
1. Edit the Resource Requests and Limits:
In your pod or deployment configuration file (YAML), specify the memory requests and limits. This ensures that Kubernetes allocates sufficient memory to your build pods.
apiVersion: v1 kind: Pod metadata: name: build-pod spec: containers: - name: build-container image: your-build-image resources: requests: memory: "2Gi" limits: memory: "4Gi"
Here, adjust the memory
values under requests
and limits
as per your needs.
2. Update the Deployment Configuration: If you are using a deployment, make similar adjustments in the deployment spec.
apiVersion: apps/v1 kind: Deployment metadata: name: build-deployment spec: replicas: 1 template: spec: containers: - name: build-container image: your-build-image resources: requests: memory: "2Gi" limits: memory: "4Gi"
3. Apply the Configuration: After updating the configuration, apply it using the kubectl
command.
kubectl apply -f your-configuration-file.yaml
By increasing the memory requests and limits, Kubernetes will allocate more memory to your build pods, helping to prevent OOM errors.
Hi,
We happen to find this problem on our private cloud cluster as well.
We manage to work this out by editing the CR: OperatorConfiguration.
kubectl get operatorconfigurations.privatecloud.mendix.com
kubectl edit operatorconfigurations.privatecloud.mendix.com mendix-operator-configuration
You should see the resource define for build pod in the following buildResources section:
```
spec:
baseOSImageTagTemplate: ubi8-1-jre{{.JavaVersion}}-entrypoint
buildResources:
limits:
cpu: '1'
memory: 1024Mi # Config here
requests:
cpu: 250m
memory: 512Mi # Config here
```
After edit the OperatorConfiguration, you may need to restart the mendix-operator pod to reload the config and kill the build pod to retry your build again.
Not sure if this work on your case, you should try to see the result.