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:
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
.Open the
Credentials
object for editing:kubectl --kubeconfig <pathToKindKubeconfig> \ edit <providerName>credentials <credentialsObjectName>
Adjust the credentials password:
In
password.secret.name
of theCredentials
objectspec
section, obtain the relatedSecret
object.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==