Summary:
How do I make a secret of a specific type in Rancher 2.3.2? Adding a parameter for type does not seem to work.
Full Details:
I’m trying to make a ceph storage class for dynamic provisioning.
Following the instructions here:
kubernetes.io/docs/concepts/storage/storage-classes/
I have made a storage class with the required information and made a secret for the admin key. The secret has to be of type kubernetes.io/rbd, but I can’t seem to be able to make a secret with a specific type.
This is the secret I have made:
If I view the secret in API, this is what I get, notice that type is a random string and not kubernetes.io/rbd (I redacted the key)
{
"annotations": {
"lifecycle.cattle.io/create.secretsController_c-mp6jx": "true"
},
"baseType": "secret",
"created": "2019-11-24T20:25:40Z",
"createdTS": xxx,
"creatorId": "user-4vn7v",
"data": {
"key": "xxx",
"type": "a3ViZXJwuZXRlcy5by9yYmQ="
},
"id": "p-q9hwm:ceph-admin-secret",
"kind": "Opaque",
"labels": {
"cattle.io/creator": "norman"
},
"links": {
"remove": "…/v3/project/xxx/secrets/p-q9hwm:ceph-admin-secret",
"self": "…/v3/project/xxx/secrets/p-q9hwm:ceph-admin-secret",
"update": "…/v3/project/xxx/secrets/p-q9hwm:ceph-admin-secret"
},
"name": "ceph-admin-secret",
"namespaceId": null,
"projectId": "xxx",
"type": "secret",
"uuid": "xxx"
}
This is the error I get in the volume:
Failed to provision volume with StorageClass "ceph6": failed to get admin secret from ["default"/"ceph-admin-secret"]: failed to get secret from ["default"/"ceph-admin-secret"]: Cannot get secret of type kubernetes.io/rbd a few seconds ago
EDIT:
I was able to fox the problem by creating a yaml file and applying it via kubectl, but as far as I can tell there is no way to create a secret of specific type via the GUI. Am I missing something or should this be a bug report?