To check the probe readiness, use the command:
#kubectl describe pod/elasticsearch-data-x -n <pod-namespace>
Displays the latest event that Readiness probe failed, as below:
Root Cause
The master nodes in the ElasticSearch cluster are not in sync.
- Log in to one of the ElasticsSearch master pod, by executing the command:
#kubectl exec -it elasticsearch-master- -n <pod-namespace>
- Check the cluster master node status, by using the command:
#curl http://elasticsearch:9200/_cat/nodes
Output:
- To logout, enter command Exit.
- Compare the IP's address for:
- elasticsearch-master-0
- elasticsearch-master-1
- elasticsearch-master-2
-
With, the IP's address of the elasticsearch-master pods, using command:
#kubectl get pods -A -o wide | grep elasticsearch-master
Output:
If the IP's of any master node mismatch, there might be problem with the master cluster formation.
Solution
- Shut down the master nodes, using command:
#kubectl scale --replicas=0 statefulset.apps/elasticsearch-master -n tcsa-system
- Ensure that, all the master nodes are down.
- Restart the master nodes, using command:
# kubectl scale --replicas=3 statefulset.apps/elasticsearch-master -n tcsa-system
- Ensure that, all the master nodes and data nodes are up and running and ready.