code: func SaveKubeConfig(config clientcmdapi.Config) error {
  	filename, err := utils.EnsureLocalPath(
  		kubeconfigFromEnv(),
  		teleport.KubeConfigDir,
  		teleport.KubeConfigFile)
  	if err != nil {
  		return trace.Wrap(err)
  	}
  
  	err = clientcmd.WriteToFile(config, filename)
  	if err != nil {
  		return trace.ConvertSystemError(err)
  	}
  	return nil
  }
docs: // SaveKubeConfig saves updated config to location specified by environment variable or
  // default location