You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploy a fresh resplicaSet with externalAccess disabled, mTLS enabled, and using the same version of the bitnami mongodb helm chart that I have stated above. Run the following commands:
The expected behavior would be that I can access my unexposed database using kubectl port-forward.
What do you see instead?
I want to make it very clear that the replicaSet initializes perfectly and can be accessed by other client applications living within the same Kubernetes cluster because they can use the k8s internal DNS names created from the headless service. My problem is my lack of ability to access the MongoDB replicaSet via MongoDB Compass. Here are the screenshots of my connectivity errors when using either localhost or 127.0.0.1:
Looking into the error and viewing the /certs/openssl.conf file I see that localhost and 127.0.0.1 aren't being added to the SAN like it used to in previous versions of the helm chart:
For more context, we used to use version 15.1.4 of the Helm chart and the SAN would always have 127.0.0.1 and localhost, allowing users to access the replicaSet via a kubectl port-forward. I don't know if this was a change in the gen_certificates init container, but maybe something to look into.
The text was updated successfully, but these errors were encountered:
The latest changes in that file were implemented some months ago in a previous major version, are you able to reproduce the issue using a chart version containing that line?
@carrodher,
It appears that those IP lines were removed in version 15.3.0 of the helm chart. Using previous versions of the chart, everything is working fine. My question for this ticket is what was the reason for it being removed? Was it security related, thought to be unneeded, etc ..? And without it, how can I connect to the MongoDB replicaSet via my local machine with it being gone? Can we put it back?
@carrodher,
I figured out a workaround to my issue. I see in the git blame, that a person named @fmulero added optional flags to the gen_certificates bash script that allows grabs IPs and hostnames from the .externalAccess.service.loadBalancerIPs and tls.extraDnsNames arrays.
After adding localhost to the tls.extraDnsNames array, I was able to connect to the replicaSet using kubectl port-forward and MongoDB Compass.
Name and Version
bitnami/mongodb:16.1.0
What architecture are you using?
amd64
What steps will reproduce the bug?
Deploy a fresh resplicaSet with
externalAccess
disabled,mTLS
enabled, and using the same version of the bitnami mongodb helm chart that I have stated above. Run the following commands:Using MongoDB Compass, or some other mongodb client application, configure your connection string to
localhost:27017
, and try to connect.Are you using any custom parameters or values?
What is the expected behavior?
The expected behavior would be that I can access my unexposed database using kubectl port-forward.
What do you see instead?
I want to make it very clear that the replicaSet initializes perfectly and can be accessed by other client applications living within the same Kubernetes cluster because they can use the k8s internal DNS names created from the headless service. My problem is my lack of ability to access the MongoDB replicaSet via MongoDB Compass. Here are the screenshots of my connectivity errors when using either
localhost
or127.0.0.1
:Looking into the error and viewing the
/certs/openssl.conf
file I see thatlocalhost
and127.0.0.1
aren't being added to the SAN like it used to in previous versions of the helm chart:For more context, we used to use version
15.1.4
of the Helm chart and the SAN would always have127.0.0.1
andlocalhost
, allowing users to access the replicaSet via a kubectl port-forward. I don't know if this was a change in thegen_certificates
init container, but maybe something to look into.The text was updated successfully, but these errors were encountered: