diff --git a/cmd/vclusterctl/cmd/platform/add/cluster.go b/cmd/vclusterctl/cmd/platform/add/cluster.go index 4d4cd408f..c25bdcf6b 100644 --- a/cmd/vclusterctl/cmd/platform/add/cluster.go +++ b/cmd/vclusterctl/cmd/platform/add/cluster.go @@ -204,8 +204,8 @@ func (cmd *ClusterCmd) Run(ctx context.Context, args []string) error { helmArgs = append(helmArgs, "--set", "insecureSkipVerify=true") } - if len(cmd.CertificateAuthorityData) > 0 { - helmArgs = append(helmArgs, "--set", "additionalCA="+string(cmd.CertificateAuthorityData)) + if accessKey.CaCert != "" { + helmArgs = append(helmArgs, "--set", "additionalCA="+string(accessKey.CaCert)) } if cmd.Wait {