-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote CA cert is created empty when remote clusters are not configured for an ES cluster #3881
Comments
Can you provide the ECK operator logs? I'm wondering if anything particular is logged about those certs. |
kubectl logs elastic-operator-0 -nelastic-system|grep cert |
@sebgl - what exactly do you mean by Elasticsearch manifest? |
Ok. here it is: apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
annotations:
common.k8s.elastic.co/controller-version: 1.2.1
elasticsearch.k8s.elastic.co/cluster-uuid: TZIF4kdNTo2cadQReCI_yw
creationTimestamp: "2020-10-27T11:28:17Z"
generation: 5
name: quickstart
namespace: default
resourceVersion: "9385298"
selfLink: /apis/elasticsearch.k8s.elastic.co/v1/namespaces/default/elasticsearches/quickstart
uid: 7da1e900-b135-4429-8ab9-45f2d3995a42
spec:
auth: {}
http:
service:
metadata:
creationTimestamp: null
spec: {}
tls:
certificate: {}
nodeSets:
- config:
node.data: false
node.ingest: false
node.master: true
node.store.allow_mmap: false
count: 2
name: master-nodes
podTemplate:
metadata:
creationTimestamp: null
spec:
containers: null
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: managed-premium
status: {}
- config:
node.data: true
node.ingest: true
node.master: false
node.store.allow_mmap: false
count: 2
name: data-nodes
podTemplate:
metadata:
creationTimestamp: null
spec:
containers:
- env:
- name: ES_JAVA_OPTS
value: -Xms4g -Xmx4g
name: elasticsearch
resources:
limits:
cpu: "2"
memory: 8Gi
requests:
cpu: 500m
memory: 4Gi
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 660Gi
storageClassName: managed-premium
status: {}
transport:
service:
metadata:
creationTimestamp: null
spec: {}
updateStrategy:
changeBudget: {}
version: 7.6.0
status:
availableNodes: 4
health: green
phase: Ready |
Any update on this matter? |
Thanks for reporting this issue @Navbar! |
As for fixing this issue, I see 3 options. If remote clusters are not set for an Elasticsearch cluster, instead of creating an empty
While (3) seems like the cleanest solution, we probably want to avoid that restart and go with either (1) or (2). |
Upgrade ECK 1.0.1 operator to 1.2.1 over K8s ended with empty transport ca.crt.
I would like to check the ca rotation feature before expiration date - new parameters added:
- --ca-cert-validity=80h
- --ca-cert-rotate-before=2h
- --cert-validity=80h
- --cert-rotate-before=2h
How to reproduce:
Logs show:
"message": "path: /_ssl/certificates, params: {}", "cluster.uuid": "TZIF4kdNTo2cadQReCI_yw", "node.id": "a63gze16SX21ZrqI0DVSbw" ,
"stacktrace": ["java.security.cert.CertificateException: failed to parse any certificates from [/usr/share/elasticsearch/config/transport-remote-certs/ca.crt]",
curl -u "elastic:password" -s -k "https://quickstart-es-http:9200/_ssl/certificates"|jq .
{
"error": {
"root_cause": [
{
"type": "certificate_exception",
"reason": "failed to parse any certificates from [/usr/share/elasticsearch/config/transport-remote-certs/ca.crt]"
}
],
"type": "certificate_exception",
"reason": "failed to parse any certificates from [/usr/share/elasticsearch/config/transport-remote-certs/ca.crt]"
},
"status": 500
}
empty cert file:
[root@quickstat-es-master-nodes-0 transport-remote-certs]# cat ca.crt
[root@quickstart-es-master-nodes-0 transport-remote-certs]# pwd
/usr/share/elasticsearch/config/transport-remote-certs
Am i doing something wrong?
The text was updated successfully, but these errors were encountered: