Specifying your MapR Ticket as a Kubernetes Secret when Running MapR Data Science Refinery
To specify your MapR Data Platform ticket as a Kubernetes Secret, you must create a secret and mount the secret in your MapR Data Science Refinery container. This topic describes the steps to do this.
- Follow the instructions at Configuring a Secret to create a
Kubernetes secret with your MapR ticket base64
encoded.
The following is a sample YAML file named
dsr-ticket.yaml
:apiVersion: v1 kind: Secret metadata: name: dsr-ticket-secret type: Opaque data: CONTAINER_TICKET: Y2x1c3RlcjMgMEpHTktQMWlBSU1td05wVWF4SXp5V0VLSjBvS080TndPSkU0SFVyazN6M3JVKzVhcllDaWhqZ3Q2TDZNMmg4UnF4VGEzMU9IaDMvUmplYytTM0F3WVRlNTdjQ2kzL1dKYTJTblJEWkE4M2h2UEFqZkwyVUlzaVcydDJXdVZhT2xtSVIydmNwa3pMNVlqYUtIbm55RlpvbmJ4SUdjQVRMTDJSaEdmL3JiY091Qk1wbzIxdlY3MnNYRHo5RXY5S1Fma0tKdElRTVNaK1JpTWwyZllCMWtHa2hhdHJ3dE5qd2tqRlB6dUpQUEU2N2hDSnRLN1pRM0NuN01KM1JhRVliWkJlRjRFVVVxUVVKSXV5T0VSV0RJbFJORCt3PT0K
- In your Kubernetes pod manifest file, specify the following lines to mount the
Kubernetes secret in your container.
The example below mounts the ticket in
/tmp/mapr_ticket/CONTAINER_TICKET
:env: - name: MAPR_TICKETFILE_LOCATION value: "/tmp/mapr_ticket/CONTAINER_TICKET" volumeMounts: - mountPath: /tmp/mapr_ticket name: maprticket readOnly: true volumes: - name: maprticket secret: secretName: dsr-ticket-secret
The following table summarizes the parameters that you must set in your YAML file and pod manifest. The values are highlighted in bold in the examples:
Parameter Description | Value in Example |
---|---|
Name of ticket file in your container | CONTAINER_TICKET |
Mount path for the ticket file in your container | /tmp/mapr_ticket |
Name of Kubernetes secret | dsr-ticket-secret |
Name of volume for mounting the secret | maprticket |