VCF Services > Data Service, but failed to connect due to TLS error.VCFA Binding Custom Resource is not ready: failed to create VCFA TM client: Get "https://vcfa-host:443/api/versions": tls: failed to verify certificate: x509: certificate signed by unknown authority.This issue occurs when the VCF Automation 's TLS certificate is signed by a root CA certificate or an intermediate CA certificate.
To resolve this issue, perform the following actions:
'dsm-system' namespace's ConfigMap and name it 'vcfa-ca' through an API call against DSM endpoint. The signing certificate should be the root CA or intermediate CA of the VCF Automation public endpoint.Sample CURL codes:
Exchange DSM JWT token by DSM admin user's username and password.
curl --location 'https://<dsm-host>/provider/session' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{"username":"<dsm-admin-username>","password":"<dsm-admin-password>"} \
--verbose'
b. From the printed output, copy out the JWT token from response header "Authorization".
c. Issue the API call to create a configmap for VCF Automation singing certificate.
curl --location 'https://<dsm-host>/api/v1/namespaces/dsm-system/configmaps' \
--header 'Authorization: Bearer <dsm-admin-jwt-token>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"kind":"ConfigMap",
"apiVersion":"v1",
"metadata":{
"name":"vcfa-ca"
},
"data":{
"tls.crt":"-----BEGIN CERTIFICATE-----\n ... \n-----END CERTIFICATE-----\n"
}
}'
Local Commands
a. SSH to the DSM appliance as a root account , copy the above vcfa-ca.yaml file to the host.
b. Run below commands in sequence:
cd /opt/vmware/tdm-provider/moneta-gateway
# apply config map
kubectl apply -f vcfa-ca.yaml -n dsm-system --kubeconfig kubeconfig-gateway.yaml
# view config map
kubectl get cm vcfa-ca -n dsm-system --kubeconfig kubeconfig-gateway.yaml -o yaml
# view bindings
kubectl get vcfabindings --kubeconfig kubeconfig-gateway.yaml -o yaml
# if necessary you can delete the config map (cm)
kubectl delete cm vcfa-ca -n dsm-system --kubeconfig kubeconfig-gateway.yaml