Changing the auto-generated kops kubernetes admin password

9/18/2017

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.

-- Ritesh Vishwakarma
amazon-web-services
kops
kubernetes

1 Answer

11/30/2017

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"

-- Hugo Ferreira
Source: StackOverflow