code: func CreatePKIAssets(cfg *kubeadmapi.InitConfiguration) error {
  	klog.V(1).Infoln("creating PKI assets")
  
  	// This structure cannot handle multilevel CA hierarchies.
  	// This isn't a problem right now, but may become one in the future.
  
  	var certList Certificates
  
  	if cfg.Etcd.Local == nil {
  		certList = GetCertsWithoutEtcd()
  	} else {
  		certList = GetDefaultCertList()
  	}
  
  	certTree, err := certList.AsMap().CertTree()
  	if err != nil {
  		return err
  	}
  
  	if err := certTree.CreateTree(cfg); err != nil {
  		return errors.Wrap(err, "error creating PKI assets")
  	}
  
  	fmt.Printf("[certs] Valid certificates and keys now exist in %q\n", cfg.CertificatesDir)
  
  	// Service accounts are not x509 certs, so handled separately
  	return CreateServiceAccountKeyAndPublicKeyFiles(cfg.CertificatesDir)
  }
docs: // CreatePKIAssets will create and write to disk all PKI assets necessary to establish the control plane.
  // If the PKI assets already exists in the target folder, they are used only if evaluated equal; otherwise an error is returned.