存储kubeconfig并在以后使用它加载配置

I have an application which is running client-go code. I want to be able to store the kubeconfig in a database as a byte array and later retrieve it and create a clientset from it from any node that has the access to this database. I'm sure that any such node already has access to access the api server.

clientcmd.BuildConfigFromFlags() seems to return restclient.Config. Is it safe to store this as a byte-array, and later use it to load the config? Assuming it is safe, how do I load the config from the byte-array? I tried to use clientcmd.RESTConfigFromKubeConfig() but that seems to be giving error: "no configuration has been provided"