How to get kubernetes secret data from java
You can use the official Java client for Kubernetes’ REST API and read the secret as defined in this doc. You will get a result of return type V1Secret.
V1Secret result = apiInstance.readNamespacedSecret(name, namespace, pretty, exact, export)
;
This object result
has a property data
of type Map<String, byte>
to get the key value pairs from.