Heapster remains in an unhealthy state
After installation, Heapster might be in an unhealthy state and unable to recover.
Symptoms
Either, or both, of the following two symptoms might occur:
- Running the command
kubectl logs <heapster_pod_name> eventer
reveals entries with messages such asFailed to config ElasticSearch
orno Elasticsearch node available
. - The Logs tab for a pod in the IBM® Cloud Private management console does not load. No log entries appear even after an extended period.
Causes
In some cases, Calico failed to correctly configure network isolation for the Elasticsearch cluster. Pods that are configured to contact the cluster on port 9200
might be rejected.
Resolving the problem
Delete and re-create the network policies for Elasticsearch and Kibana.
-
Delete the existing policies.
kubectl delete netpol elasticsearch-client-policy elasticsearch-internal-policy kibana-policy -n kube-system
-
Connect remotely into the master node.
-
From your cluster installation directory, run this command:
kubectl install -f cluster/cfc-components/elasticsearch/es-netpolicy.yaml
This command resets the Calico settings on the Elasticsearch nodes. The next time that Kubernetes attempts to start the Heapster pod, it can access the Elasticsearch pod.
-
(Optional) Delete the Heapster pod to force Kubernetes to immediately restart it:
kubectl delete pod <heapster_pod_name>