Question

helm stable/elastic-stack failure to deploy

Hello,

I am wondering if anyone has successfully deployed the helm chart stable/elastic-stack to a DigitalOcean Kubernetes cluster (n.b. the elasticsearch url must be set!).

As far as we can tell, this isn’t possible as resource contention and random errors prevent a successful (and stable) deployment - resulting in a NODE going down; despite attempting to deploy on a cluster with 5 droplets, 10 GB RAM and 10 vCPUs (2 GB RAM per node).

It would be very useful if someone could confirm that they also cannot deploy this chart on DigitalOcean. I am in the process of deploying this chart on GCE and will update this post once that is complete.

Kind regards,

Aaron

p.s. the instructions we have been sent are as follows:

# Create tiller service account
 kubectl create serviceaccount --namespace kube-system tiller

# Create cluster rolebinding for tiller permissions
 kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller

# Install and initialize helm
 helm init --service-account tiller

# update helm repos
 helm repo update

# Install ELK helm chart
 helm install stable/elastic-stack

# View services and note the name of the elasticsearch client service.
# You will need this in the next steps.
 kubectl get services

# Edit the elasticsearch url to be equal to:
# http://<Your ES client service name>.default.svc.cluster.local:9200
 kubectl edit deployment silly-elk-kibana

# Edit the logstash statefulset to have the environment variable for ELASTICSEARCH_HOST
# equal to the elasticsearch URL we configured in the last step
 kubectl edit statefulset silly-elk-logstash

# Edit the kibana configmap and set 'elasticsearch.url' equal to our elasticsearch url used above.
 kubectl edit configmaps silly-elk-kibana

# Delete the kibana pod so it spins up with the new configmap.
# After a few minutes you should be able to access the kibana service.

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
June 20, 2023

Hello,

Deploying the Elastic Stack on Kubernetes can be quite resource-intensive, and depending on the specifics of your deployment, it might lead to issues like you’re experiencing.

It can be especially challenging when running on smaller nodes, like you are (2GB RAM per node). The Elastic Stack, especially Elasticsearch, can be quite demanding on resources.

Here are a few things you can try out to further investigate the issue:

  1. Check the logs of your Elastic Stack components: You can view the logs of a specific pod with kubectl logs <pod-name>. This might provide some insight into why a node is going down.

  2. Investigate Kubernetes events: Use kubectl get events --sort-by='.metadata.creationTimestamp' to get recent events in the cluster. This may give some clues about what’s going wrong.

  3. Monitor resources: Use commands like kubectl top pods and kubectl describe node <node-name> to get an idea of how your resources are being used.

  4. Adjust resources: Elastic Stack components’ resource allocations can be adjusted using Helm chart values. Try increasing the memory and CPU resources for Elasticsearch and see if that makes a difference. Be careful not to exceed the available resources on your nodes. Keep in mind that Kubernetes also needs resources to run its system components.

  5. Adjust your nodes: As mentioned earlier, Elasticsearch can be resource-demanding. 2GB RAM per node may not be sufficient for stable operation, particularly when you have other components also running. You might consider running larger nodes.

Remember, the Elastic Stack can require a lot of resources, especially when dealing with larger amounts of data. Make sure your cluster has enough resources to handle it.

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel