<p>By following link <a href="https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/" rel="noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/</a> it is described how to add secret (encripted) data.</p>

<p>How to get that key-value s with from java client?</p>

emanuel07
<p>You can use the official Java client for Kubernetes’ REST API and read the secret as defined in this <a href="https://github.com/kubernetes-client/java/blob/master/kubernetes/docs/CoreV1Api.md#readNamespacedSecret" rel="noreferrer">doc</a>. You will get a result of return type <a href="https://github.com/kubernetes-client/java/blob/master/kubernetes/docs/V1Secret.md" rel="noreferrer">V1Secret</a>. </p>

<p><code>V1Secret result = apiInstance.readNamespacedSecret(name, namespace, pretty, exact, export)</code>;</p>

<p>This object <code>result</code> has a property <code>data</code> of type <code>Map&lt;String, byte&gt;</code> to get the key value pairs from.</p>
