diff --git a/mgradm/cmd/migrate/kubernetes/utils.go b/mgradm/cmd/migrate/kubernetes/utils.go index a3f72886a..ed1bf182a 100644 --- a/mgradm/cmd/migrate/kubernetes/utils.go +++ b/mgradm/cmd/migrate/kubernetes/utils.go @@ -197,6 +197,8 @@ func migrateToKubernetes( return err } + // Reinitialize the connection since the pod name has changed since we first checked + cnx = shared.NewConnection("kubectl", "", shared_kubernetes.ServerFilter) if err := cnx.CopyCaCertificate(fqdn); err != nil { return utils.Errorf(err, L("failed to add SSL CA certificate to host trusted certificates")) } diff --git a/mgradm/shared/kubernetes/install.go b/mgradm/shared/kubernetes/install.go index 9e0e7f49c..a8b561618 100644 --- a/mgradm/shared/kubernetes/install.go +++ b/mgradm/shared/kubernetes/install.go @@ -73,7 +73,7 @@ func Deploy( return cnx.WaitForServer() } -// DeployCertificate executre a deploy a new certificate given an helm. +// DeployCertificate deploys a new SSL certificate. func DeployCertificate(helmFlags *cmd_utils.HelmFlags, sslFlags *cmd_utils.SslCertFlags, rootCa string, ca *ssl.SslPair, kubeconfig string, fqdn string, imagePullPolicy string) ([]string, error) { helmArgs := []string{}