I have set pod definition config as below. i set both heap memory and memory limits on container,
spec:
containers:
- command:
- sh
- '-c'
- >-
exec java -XX:+UseG1GC -Xms512m -Xmx512m -XX:MaxRAM=640m
ports:
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 8443
name: https
protocol: TCP
- containerPort: 8081
name: management
protocol: TCP
resources:
limits:
cpu: 200m
memory: 950Mi
requests:
cpu: 100m
memory: 128Mi
but pod fequently gets killed with OOM. in that case what values should i change. whether resources part or heap memory .
also would like to how memory as jvm arguments and memory as resources works together.