Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 502
Ritesh Vishwakarma Avatar asked Sep 18 '17 10:09

Ritesh Vishwakarma


People also ask

What is the difference between Kubectl & Kops?

Kops is sometimes referred to as the 'kubectl' for spinning up clusters. Kops lets you create, destroy and upgrade Kubernetes clusters and is supported on AWS (Amazon Web Services, we cover more of this on our Kubernetes on AWS - what you need to know page) with GKE in beta support, and VMware vSphere in alpha.


1 Answers

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"

like image 193
Hugo Ferreira Avatar answered Dec 06 '22 18:12

Hugo Ferreira