func Parse(raw []byte) (*config.Cluster, error) {
	tm := typeMeta{}
	if err := yaml.Unmarshal(raw, &tm); err != nil {
		return nil, errors.Wrap(err, "could not determine kind / apiVersion for config")
	}
	switch tm.APIVersion {
	case "kind.x-k8s.io/v1alpha4":
		if tm.Kind != "Cluster" {
			return nil, errors.Errorf("unknown kind %s for apiVersion: %s", tm.Kind, tm.APIVersion)
		}
		cfg := &v1alpha4.Cluster{}
		if err := yamlUnmarshalStrict(raw, cfg); err != nil {
			return nil, errors.Wrap(err, "unable to decode config")
		}
		return V1Alpha4ToInternal(cfg), nil
	}
	return nil, errors.Errorf("unknown apiVersion: %s", tm.APIVersion)
}
Parse parses a cluster config from raw (yaml) bytes
It will always return the current internal version after defaulting and
conversion from the read version
package encoding
import (
	"bytes"
	"io/ioutil"
	yaml "gopkg.in/yaml.v3"
	"sigs.k8s.io/kind/pkg/apis/config/v1alpha4"
	"sigs.k8s.io/kind/pkg/errors"
	"sigs.k8s.io/kind/pkg/internal/apis/config"
)
func Load(path string) (*config.Cluster, error) {
	if path == "" {
		out := &config.Cluster{}
		config.SetDefaultsCluster(out)
		return out, nil
	}
	raw, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, errors.Wrap(err, "error reading file")
	}
	return Parse(raw)
}