code: func (k *KubeadmCert) CreateFromCA(ic *kubeadmapi.InitConfiguration, caCert *x509.Certificate, caKey crypto.Signer) error {
  	cfg, err := k.GetConfig(ic)
  	if err != nil {
  		return errors.Wrapf(err, "couldn't create %q certificate", k.Name)
  	}
  	cert, key, err := pkiutil.NewCertAndKey(caCert, caKey, cfg)
  	if err != nil {
  		return err
  	}
  	err = writeCertificateFilesIfNotExist(
  		ic.CertificatesDir,
  		k.BaseName,
  		caCert,
  		cert,
  		key,
  		cfg,
  	)
  
  	if err != nil {
  		return errors.Wrapf(err, "failed to write or validate certificate %q", k.Name)
  	}
  
  	return nil
  }
docs: // CreateFromCA makes and writes a certificate using the given CA cert and key.