Rate This Document
Findability
Accuracy
Completeness
Readability

Creating a Secret for Ceph

Create the secret required by Ceph on the Kubernetes management node, including configuring the csi-rbd-secret.yaml file.

  1. View and save the client.kubernetes key on the Ceph management node.
    ceph auth get client.kubernetes

    An example of the expected result:

    The key will be used in 3. Keep it secure.

  2. Create a csi-rbd-secret.yaml file.
    vi csi-rbd-secret.yaml
  3. Press i to enter the insert mode and add the following content to the csi-rbd-secret.yaml file: Set userKey to the client.kubernetes key saved in 1.
    apiVersion: v1 
    kind: Secret 
    metadata: 
      name: csi-rbd-secret 
      namespace: default 
    stringData: 
      userID: kubernetes 
      userKey: AQCsiTtl6jESExAALOiPVIEG7bjGXdzFUFCPtw==
  4. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  5. Deploy the secret.
    kubectl apply -f csi-rbd-secret.yaml