WebSphereLibertyDump custom resource
The WebSphereLibertyDump custom resource (CR) causes a Liberty server memory dump to be created. A Java™ dump can also be included. The memory and Java dumps are from a Liberty server instance that is running in a pod.
WebSphereLibertyDump prerequisites
WebSphereLibertyDump provides a day-2 operation.
Before you can use WebSphereLibertyDump, the WebSphereLibertyApplication CR must configure storage for serviceability and a CR for WebSphereLibertyDump must exist in the same namespace as the WebSphereLibertyApplication CR.
For automatic discovery of supported day-2 operations from external tools, the following annotations must exist in the WebSphereLibertyApplication and WebSphereLibertyDump custom resource definitions (CRDs).
- The WebSphereLibertyApplication CRD must have an annotation that
specifies the WebSphereLibertyDump day-2 operation. The following example adds annotations for both
day-2 operations.
annotations: openliberty.io/day2operations: WebSphereLibertyTrace,WebSphereLibertyDump - The WebSphereLibertyDump CRD must have an annotation that specifies the
Podk8sKindfor the day-2 operation.annotations: day2operation.openliberty.io/targetKinds: Pod
WebSphereLibertyDump configurable parameters
The WebSphereLibertyDump CRD has configurable parameters. The following list describes the parameters.
- include
- A list of Java dump types to request.
Available dump type values are
thread,heap, andsystem. - license
- Information about the license, which is available at https://ibm.biz/was-license.
- accept
- A boolean that specifies whether the license is accepted. The default is
false. The value must betrueto accept the license and enable deployment of the WebSphereLibertyDump day-2 operation.
- podName
- The name of the
Pod, which must be in the same namespace as theWebSphereLibertyDumpCR.
WebSphereLibertyDump example
The following YAML example sets values for license,
podName, and include parameters in the
WebSphereLibertyDump CR. The example includes the thread and heap
dump types.
apiVersion: liberty.websphere.ibm.com/v1
kind: WebSphereLibertyDump
metadata:
name: example-dump
spec:
license:
accept: false
podName: my_pod_name
include:
- thread
- heap
The following example shows the status conditions and the dump file location of the
WebSphereLibertyDump CR status. The file is stored in the
serviceability folder with a format such as
/serviceability/namespace/pod_name/serverDumps/timestamp.zip.
status:
conditions:
- lastUpdateTime: '2025-04-25T19:38:13Z'
status: 'True'
type: Started
- lastUpdateTime: '2025-04-25T19:38:15Z'
status: 'True'
type: Completed
dumpFile: /serviceability/my_namespace/my_pod_name/serverDumps/dump_2025.04.25_19.38.13_utc.zip
After the dump starts, you cannot reuse the CR for more dumps. Each server dump requires a new CR.
You can check the status of a memory dump operation in the status field of the
CR YAML. You can also run an Red Hat® OpenShift® CLI
(oc) or Kubernetes CLI (kubectl) get wldump
command to see the status of all dump operations in the current namespace.
oc get wldump -o wide
kubectl get wldump -o wide
wldump and wldumps are short names for
webspherelibertydump, the singular name, and
webspherelibertydumps, the plural name.