mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
kubeadm: flatten admin.conf for cluster-info
This commit is contained in:
parent
d39214ade1
commit
9de0b2bf46
@ -47,6 +47,9 @@ func CreateBootstrapConfigMapIfNotExists(client clientset.Interface, file string
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to load admin kubeconfig")
|
||||
}
|
||||
if err = clientcmdapi.FlattenConfig(adminConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
adminCluster := adminConfig.Contexts[adminConfig.CurrentContext].Cluster
|
||||
// Copy the cluster from admin.conf to the bootstrap kubeconfig, contains the CA cert and the server URL
|
||||
|
Loading…
Reference in New Issue
Block a user