code: func SetClusterDynamicDefaults(cfg *kubeadmapi.ClusterConfiguration, advertiseAddress string, bindPort int32) error {
  	// Default all the embedded ComponentConfig structs
  	componentconfigs.Known.Default(cfg)
  
  	ip := net.ParseIP(advertiseAddress)
  	if ip.To4() != nil {
  		cfg.ComponentConfigs.KubeProxy.BindAddress = kubeadmapiv1beta2.DefaultProxyBindAddressv4
  	} else {
  		cfg.ComponentConfigs.KubeProxy.BindAddress = kubeadmapiv1beta2.DefaultProxyBindAddressv6
  	}
  
  	// Resolve possible version labels and validate version string
  	if err := NormalizeKubernetesVersion(cfg); err != nil {
  		return err
  	}
  
  	// If ControlPlaneEndpoint is specified without a port number defaults it to
  	// the bindPort number of the APIEndpoint.
  	// This will allow join of additional control plane instances with different bindPort number
  	if cfg.ControlPlaneEndpoint != "" {
  		host, port, err := kubeadmutil.ParseHostPort(cfg.ControlPlaneEndpoint)
  		if err != nil {
  			return err
  		}
  		if port == "" {
  			cfg.ControlPlaneEndpoint = net.JoinHostPort(host, strconv.FormatInt(int64(bindPort), 10))
  		}
  	}
  
  	// Downcase SANs. Some domain names (like ELBs) have capitals in them.
  	LowercaseSANs(cfg.APIServer.CertSANs)
  	return nil
  }
docs: // SetClusterDynamicDefaults checks and sets values for the ClusterConfiguration object