Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.16.0 and 2.17.0
Describe the issue:
I’ve been using OpenSearch with the security.tls.http.generate: true option enable, and everything its been working fine. However, when I remove that option to use TLS and self-generated certificates, the admin-cert secret is not being generated, others secrets (ca, transport-cert, admin-password) are being created successfully. As per the documentation on (opensearch-k8s-operator/docs/userguide/main.md at main · opensearch-project/opensearch-k8s-operator · GitHub) it should be enough by removing the http part and leave only security.tls.transport.generate and perNode.
I’m getting below errors.
1.- MountVolume.SetUp failed for volume “admin-cert” : secret “opensearch-admin-cert” not found.
2.- Unable to attach or mount volumes: unmounted volumes=[admin-cert], unattached volumes=, failed to process volumes=: timed out waiting for the condition
Hi @pablo , the thing is that I’m not providing any certificates at all, I just removed the tls.http block (which was working well, creating all secrets including the admin one ) and according to operator documentation a set of certificates should be created as well.
@GTGabaaron As per documentation, you either let the Operator generate the certificates or you provide your custom ones. There is no option to disable security at HTTP using Operator.
Hi @pablo thanks for the clarification. The operator documentation is misleading on this aspect, it make you belief you can either select between TLS/HTTP under the security.tls block and that in both cases the operator will create all the secrets/certificates for you, but looks like is not the case. You cannot remove the security.tls.http.generate part.
Hi @pablo, thanks for the help issue has been fixed and all seems to be working fine now.
I’ve got a side question, do you know if there is any support service/plan ($$) that can be acquired ? I looked for on the OpenSearch website but couldn’t find anything related to.
Hello @GTGabaaron - there are a number of solution providers who offer 24x7 support - I recommend looking through this page to find one in your region:
Wtih the below codes from link that has already given by @pablo, secret.name and caSecret.name will be valid only if generate: false
# ...
spec:
security:
tls: # Everything related to TLS configuration
http: # Configuration of the HTTP endpoint
generate: true # Have the Operator generate and sign certificates
secret:
name: # Name of the secret that contains the provided certificate
caSecret:
name: # Name of the secret that contains a CA the Operator should use
# ...
Being true for security.tls.http.generate (and transport) makes ConfigMap named <cluster-name>-config. Also, it means that you have to mount certificates using additionalVolumes CRD already has prepared.
spec:
general:
additionalVolumes:
- name: certificates
path: /user/share/opensearch/config/tls-http # example path
secret:
secretName: tls # example secret
Let’s say <cluster-name> is “test-opensearch-cluster-2”, the below manifest will be applied to the Kubernetes.