func GetKubeconfig() *rest.Config {
	kubeConfigPath := filepath.Join(os.Getenv("HOME"), ".kube", "config")
	kubeConfig, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath)
	CheckError(err, "Could not obtain or read the local .kube/config file")
	return kubeConfig
}
GetKubeconfig returns the cluster configuration
package main
import (
	"context"
	"os"
	"path/filepath"
	"k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/rest"
	"k8s.io/client-go/tools/clientcmd"
)
func GetClient(kubeConfig *rest.Config) *kubernetes.Clientset {
	client, err := kubernetes.NewForConfig(kubeConfig)
	CheckError(err, "Could not generate a Kubernetes client")
	return client
}