I have a Mendix application running as a pod in a Kubernetes cluster, exposed through a LoadBalancer service. Mendix is a Java application, and I want to enable JMX for monitoring and connect it to VisualVM for debugging purposes.
Where should I configure JMX settings? Should I make changes in the StatefulSet file or the Dockerfile for my application?
How can I connect my Mendix application, running in a Kubernetes pod, to VisualVM installed locally on my desktop? What configurations or steps are needed to establish this connection?
I appreciate any guidance or advice on how to set up JMX for my Mendix application in a Kubernetes environment and connect it to VisualVM for monitoring and debugging.
Thank you!
apiVersion: v1
kind: Service
metadata:
name: mendix-app-service
spec:
selector:
app: mendix-k8s
ports:
- port: 8080
targetPort: 9376
nodePort: 30012
type: LoadBalancer
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mendix-k8s-stateful
labels:
app: mendix-k8s
spec:
serviceName: mendix-app-service
replicas: 1
selector:
matchLabels:
app: mendix-k8s
template:
metadata:
labels:
app: mendix-k8s
spec:
containers:
- name: mendix-app
image: nethaaji/demoapp:53
imagePullPolicy: Always
ports:
- containerPort: 8080
env:
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: mendix-app-secrets
key: admin-password
- name: DATABASE_ENDPOINT
valueFrom:
secretKeyRef:
name: mendix-app-secrets
key: db-endpoint
this is my sample yaml file for my application. tell me where can i configure?