Passing MapR Data Science Refinery Password as a Secret in Kubernetes

To avoid passing your MAPR_CONTAINER_PASSWORD in clear text, you can use a Kubernetes secret. This topic shows you how to do this.

  1. Create a secret (dsr-container-secret.yaml) where you have base64 encoded MAPR_CONTAINER_PASSWORD:
    apiVersion: v1
    kind: Secret
    metadata:
      name: dsr-container-secret
    type: Opaque
    data:
      password: azhzUm9ja3M=

    azhzUm9ja3M= is the base64 encoding of k8sRocks.

  2. Create the secret before deploying your MapR Data Science Refinery container by running the following command:
    kubectl create -f dsr-container-secret.yaml
  3. Reference the secret in your deployment YAML file as follows:
    - name: MAPR_CONTAINER_PASSWORD
          valueFrom:
            secretKeyRef:
              name: dsr-container-secret
              key: password