Search code examples
amazon-web-serviceskuberneteskops

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.


Solution

  • 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"