// Cluster contains information about how to communicate with a kubernetes cluster
typeClusterstruct{
// LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
LocationOfOriginstring
// Server is the address of the kubernetes cluster (https://hostname:port).
Serverstring`json:"server"`
// APIVersion is the preferred api version for communicating with the kubernetes cluster (v1beta1, v1beta2, v1beta3, etc).
...
...
@@ -65,6 +67,8 @@ type Cluster struct {
// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are.
typeAuthInfostruct{
// LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
LocationOfOriginstring
// AuthPath is the path to a kubernetes auth file (~/.kubernetes_auth). If you provide an AuthPath, the other options specified are ignored
AuthPathstring`json:"auth-path,omitempty"`
// ClientCertificate is the path to a client cert file for TLS.
...
...
@@ -87,6 +91,8 @@ type AuthInfo struct {
// Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with)
typeContextstruct{
// LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized.
LocationOfOriginstring
// Cluster is the name of the cluster for this context
Clusterstring`json:"cluster"`
// AuthInfo is the name of the authInfo for this context
Use:fmt.Sprintf("set-context NAME [--%v=cluster_nickname] [--%v=user_nickname] [--%v=namespace]",clientcmd.FlagClusterName,clientcmd.FlagAuthInfoName,clientcmd.FlagNamespace),
// getStartingConfig returns the Config object built from the sources specified by the options, the filename read (only if it was a single file), and an error if something goes wrong