Discovery
The Stackable Operator for Apache HDFS publishes a discovery ConfigMap, which exposes a client configuration bundle that allows access to the Apache HDFS cluster.
Example
Given the following HDFS cluster:
apiVersion: hdfs.stackable.tech/v1alpha1
kind: HdfsCluster
metadata:
  name: {clusterName} (1)
  namespace: {namespace} (2)
spec:
  namenode:
    roleGroups:
      default: (3)
  […]| 1 | The name of the HDFS cluster, which is also the name of the created discovery ConfigMap. | 
| 2 | The namespace of the discovery ConfigMap. | 
| 3 | A role group name of the namenoderole. | 
The resulting discovery ConfigMap is located at {namespace}/{clusterName}.
Contents
The ConfigMap data values are formatted as Hadoop XML files which allows simple mounting of that ConfigMap into pods that require access to HDFS.
- core-site.xml
- 
Contains the fs.DefaultFSwhich defaults tohdfs://{clusterName}/.
- hdfs-site.xml
- 
Contains the dfs.namenode.*properties forrpcandhttpaddresses for thenamenodesas well as thedfs.nameservicesproperty which defaults tohdfs://{clusterName}/.