Kubernetes secret objects enable you to store and manage sensitive information.
To create the secret key:
- Obtain the client admin key.
- Log in using SSH to the Ceph cluster node in which Ceph-mon is running, and then:
- Run the following command:
ceph auth get-key client.admin
- If the preceding step does not provide the key, obtain it from the /etc/ceph/ceph.client.admin.keyring file.
- Obtain the base64 value of the key by running the following command:
echo -n {key} | base64
- Create a sample YAML file for the secret key with the following content:
apiVersion: v1
kind: Secret
metadata:
name: ceph-secret (provide any random name as per choice)
namespace: ceph-storage-integration
data:
key: WSA45BYUDNSJGFJKFDGHJDHFGJsdfbusygo76t32SDDSHFGDSFG=
type: kubernetes.io/rbd
Note: Replace the name, namespace, and key values to match your environment.
- Save the file in the OpenShift master node as secret-file.yaml.
- To create the secret key in the OpenShift master node, run the following command:
oc create -f secret-file.yaml