Troubleshoot credentials creation

If the Credentials object is in the Error or Invalid state, verify whether the provided credentials are valid and adjust them accordingly.

Warning

The kubectl apply command automatically saves the applied data as plain text into the kubectl.kubernetes.io/last-applied-configuration annotation of the corresponding object. This may result in revealing sensitive data in this annotation when creating or modifying the object.

Therefore, do not use kubectl apply on this object. Use kubectl create, kubectl patch, or kubectl edit instead.

If you used kubectl apply on this object, you can remove the kubectl.kubernetes.io/last-applied-configuration annotation from the object using kubectl edit.

To adjust the Credentials object:

  1. Verify the Credentials object status:

    kubectl --kubeconfig <pathToKindKubeconfig> \
    get <providerName>credentials <credentialsObjectName> -o jsonpath='{.status.valid}{"\n"}'
    

    Replace <providerName> with the name of the selected provider. For example, openstackcredentials.

  2. Open the Credentials object for editing:

    kubectl --kubeconfig <pathToKindKubeconfig> \
    edit <providerName>credentials <credentialsObjectName>
    
  3. Adjust the credentials password:

    1. In password.secret.name of the Credentials object spec section, obtain the related Secret object.

    2. Replace the existing base64-encoded string of the related secret with a new one containing the adjusted password:

      apiVersion: v1
      kind: Secret
      data:
        value: Zm9vYmFyCg==