// InitKubeClient creates a new k8s client for use in talking to the cluster's
// api server.
InitKubeClient creates a new k8s client for use in talking to the cluster's
api server.
// InitKubeClient creates a new k8s client for use in talking to the cluster ' s // api server .
func InitKubeClient(context string) error {
	log.WithFields(log.Fields{
		"context": context,
	}).Debug("initializing kubernetes client")
	config, _, err := GetKubeConfig(context)
	if err != nil {
		return err
	}
	client, err := kubernetes.NewForConfig(config)
	log.WithFields(log.Fields{
		"host": config.Host,
	}).Debug("kubernetes client created")
	if err != nil {
		return err
	}
	Client = client
	kubeCfg = config
	return nil
}
func InitKubeClient ( context string ) error { log . WithFields ( log . Fields { " " : context , } ) . Debug ( " " ) config , _ , err := GetKubeConfig ( context ) if err != nil { return err } client , err := kubernetes . NewForConfig ( config ) log . WithFields ( log . Fields { " " : config . Host , } ) . Debug ( " " ) if err != nil { return err } Client = client kubeCfg = config return nil }
InitKubeClient creates a new k8s client for use in talking to the cluster's
api server.
InitKubeClient creates a new k8s client for use in talking to the cluster ' s api server .
// TODO: better error