Ritesh Vishwakarma
Ritesh Vishwakarma

Reputation: 73

Changing the auto-generated kops kubernetes admin password

I have been using kops to build the kubernetes cluster which is really easy-to-go tool, however i am unable to find a way-out on how to change the admin password which is auto-generated while the cluster is being created.

Upvotes: 5

Views: 1160

Answers (1)

Hugo Ferreira
Hugo Ferreira

Reputation: 1634

As it is currently not possible to modify or delete + create secrets of type "Secret" with the CLI you have to modify them directly in the kops s3 bucket.

They are stored /clustername/secrets/ and contain the secret as a base64 encoded string. To change the secret base64 encode it with:

echo -n 'MY_SECRET' | base64

and replace it in the "Data" field of the file. Verifiy your change with get secrets and perform a rolling update of the cluster

Seen in Managing secrets Kops’s documentation: Workaround for changing secrets with type "Secret"

Upvotes: 7

Related Questions