func BindClusterFlags(clusterInfo *clientcmdapi.Cluster, flags *pflag.FlagSet, flagNames ClusterOverrideFlags) {
	flags.StringVarP(&clusterInfo.Server, flagNames.APIServer, flagNames.APIServerShort, "", "The address and port of the Kubernetes API server")
	flags.StringVar(&clusterInfo.APIVersion, flagNames.APIVersion, "", "The API version to use when talking to the server")
	flags.StringVar(&clusterInfo.CertificateAuthority, flagNames.CertificateAuthority, "", "Path to a cert. file for the certificate authority.")
	flags.BoolVar(&clusterInfo.InsecureSkipTLSVerify, flagNames.InsecureSkipTLSVerify, false, "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.")
}
BindClusterFlags is a convenience method to bind the specified flags to their associated variables
package clientcmd
import (
	"github.com/spf13/pflag"
	clientcmdapi "github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd/api"
)
type ConfigOverrides struct {
	AuthInfo       clientcmdapi.AuthInfo
	ClusterInfo    clientcmdapi.Cluster
	Context        clientcmdapi.Context
	CurrentContext string
}
type ConfigOverrideFlags struct {
	AuthOverrideFlags    AuthOverrideFlags
	ClusterOverrideFlags ClusterOverrideFlags
	ContextOverrideFlags ContextOverrideFlags
	CurrentContext       string
}
type AuthOverrideFlags struct {
	AuthPath          string
	AuthPathShort     string
	ClientCertificate string
	ClientKey         string
	Token             string
	Username          string
	Password          string
}
type ContextOverrideFlags struct {
	ClusterName  string
	AuthInfoName string
	Namespace    string
	NamespaceShort string
}
type ClusterOverrideFlags struct {
	APIServer             string
	APIServerShort        string
	APIVersion            string
	CertificateAuthority  string
	InsecureSkipTLSVerify string
}
const (
	FlagClusterName  = "cluster"
	FlagAuthInfoName = "user"
	FlagContext      = "context"
	FlagNamespace    = "namespace"
	FlagAPIServer    = "server"
	FlagAPIVersion   = "api-version"
	FlagAuthPath     = "auth-path"
	FlagInsecure     = "insecure-skip-tls-verify"
	FlagCertFile     = "client-certificate"
	FlagKeyFile      = "client-key"
	FlagCAFile       = "certificate-authority"
	FlagBearerToken  = "token"
	FlagUsername     = "username"
	FlagPassword     = "password"
)
func RecommendedAuthOverrideFlags(prefix string) AuthOverrideFlags {
	return AuthOverrideFlags{
		AuthPath:          prefix + FlagAuthPath,
		ClientCertificate: prefix + FlagCertFile,
		ClientKey:         prefix + FlagKeyFile,
		Token:             prefix + FlagBearerToken,
		Username:          prefix + FlagUsername,
		Password:          prefix + FlagPassword,
	}
}
func RecommendedClusterOverrideFlags(prefix string) ClusterOverrideFlags {
	return ClusterOverrideFlags{
		APIServer:             prefix + FlagAPIServer,
		APIVersion:            prefix + FlagAPIVersion,
		CertificateAuthority:  prefix + FlagCAFile,
		InsecureSkipTLSVerify: prefix + FlagInsecure,
	}
}
func RecommendedConfigOverrideFlags(prefix string) ConfigOverrideFlags {
	return ConfigOverrideFlags{
		AuthOverrideFlags:    RecommendedAuthOverrideFlags(prefix),
		ClusterOverrideFlags: RecommendedClusterOverrideFlags(prefix),
		ContextOverrideFlags: RecommendedContextOverrideFlags(prefix),
		CurrentContext:       prefix + FlagContext,
	}
}
func RecommendedContextOverrideFlags(prefix string) ContextOverrideFlags {
	return ContextOverrideFlags{
		ClusterName:  prefix + FlagClusterName,
		AuthInfoName: prefix + FlagAuthInfoName,
		Namespace:    prefix + FlagNamespace,
	}
}
func BindAuthInfoFlags(authInfo *clientcmdapi.AuthInfo, flags *pflag.FlagSet, flagNames AuthOverrideFlags) {
	flags.StringVarP(&authInfo.AuthPath, flagNames.AuthPath, flagNames.AuthPathShort, "", "Path to the auth info file. If missing, prompt the user. Only used if using https.")
	flags.StringVar(&authInfo.ClientCertificate, flagNames.ClientCertificate, "", "Path to a client key file for TLS.")
	flags.StringVar(&authInfo.ClientKey, flagNames.ClientKey, "", "Path to a client key file for TLS.")
	flags.StringVar(&authInfo.Token, flagNames.Token, "", "Bearer token for authentication to the API server.")
	flags.StringVar(&authInfo.Username, flagNames.Username, "", "Username for basic authentication to the API server.")
	flags.StringVar(&authInfo.Password, flagNames.Password, "", "Password for basic authentication to the API server.")
}