Cloud API Overview > @adpt/cloud > k8s > MakeClusterInfoOptions > kubeconfig
k8s.MakeClusterInfoOptions.kubeconfig property
A Javascript Object representing a valid kubeconfig, or a YAML string, or a path to a kubeconfig file.
Signature:
kubeconfig?: Kubeconfig | string;
Remarks
If this is a Javascript object, it will be treated like a parsed kubeconfig. If this is a string, k8s.makeClusterInfo() will first attempt to parse it as JSON. If that fails, it will attempt to parse it as YAML. If that fails it will treat the string as a path of configs (like with the KUBECONFIG
environment variable).
If kubeconfig is missing k8s.makeClusterInfo() will use the KUBECONFIG
environment variable to build a suitable config using kubectl config view --flatten
and return that as the kubeconfig in the resulting k8s.ClusterInfo