August 13, 2021
Red Hat Advanced Cluster Management for Kubernetes and it’s upstream Open Cluster Management automate cluster lifecycle management from creation, configuration, upgrade, and destruction.
If a cluster is created by RHACM you may need to download the kubeadmin password and the kubeconfig. This is easily accomplished by browsing to the RHACM cluster overview, but how do you do the same from the CLI?
The creation of a cluster starts with a ClusterDeployment which will be interpreted by Hive. Subsequently associated kubeconfig and kuebadmincreds secrets will be generated holding the values we are looking for.
Use this script to extract the kubeconfig and kubeadmin credentials of a managed cluster that was deployed by RHACM.
Demo: Recover Kubeconfig for RHACM Deployed Cluster
📺 ASCII Screencast
Kubeconfig of an RHACM created cluster can be downloaded from CLI.