Elasticsearch on k8s (ECK) All about passwords

Lets talk about passwords! How is it set, where is it, how do you reset it, how do you force it? When you do a simple deployment such as apiVersion: elasticsearch.k8s.elastic.co/v1 kind: Elasticsearch metadata: name: quickstart spec: version: 8.1.1 nodeSets: – name: default count: 1 config: node.store.allow_mmap: false Where is your password stored and how do you access it? For this article we will assume that your deployment name is quickstart Default The elastic users password is stored in secrets along with all the other secrets. It usually takes form of <DEPLYMENT NAME>-es-elastic-user and to get the password you can… Continue Reading


Create secrets to use with your elastic stack to create keystore in kubernetes – minio example – helm example included

For this example I will stand up a very simple minio server on my localhost. Create kubernetes secrets for the s3.client.default.access_key and s3.client.default.secret_key. Configure my elasticsearch pod with initContainer to install the repository-s3 plugin and secureSettings to create the keystore. minio server This is a very simple, not secure setup just for testing $ mkdir data $ wget https://dl.min.io/server/minio/release/linux-amd64/minio $ chmod +x minio $ ./minio server ./data API: RootUser: minioadmin RootPass: minioadmin Console: RootUser: minioadmin RootPass: minioadmin Command-line: https://docs.min.io/docs/minio-client-quickstart-guide $ mc alias set myminio minioadmin minioadmin Instead of getting… Continue Reading


elasticsearch stack monitoring on kubernetes(ECK)

UPDATE: Since ECK operator 1.7 there is a new way to deploy stack monitoring. I’ve added the section at the end to cover for this. The old method still works and depending on your use case you can still use the old method versus new. The main difference between the OLD and NEW is that the OLD method uses filebeat and metricbeat pods while the new method uses filebeat and metricbeat sidecar containers. Lets get started with monitoring your elastic stack in kubernetes. There are multiple ways of doing this and I will divide this up into 3 sections, using… Continue Reading


How to run setup for various beats(filebeat, metricbeat, & more) in kubernetes to load dashboards and more

Whenever you install beats or update beats its best if you run the setup so that the setup will update your index templates, ILM, visualizations, etc. I found that its always best before installing or upgrading to use a seed host to just run the setup before deploying or updating across your environment and to turn off template updates and dashboard loading on the beats locally so that your elasticsearch cluster is not flooded. In a baremetal environment this is easy to do but in docker and in kubernetes it gets a bit difficult. Sure you can setup a initContainer… Continue Reading


Rescuing pods from CrashLoopBackOff

When pods behave badly in your cluster, looping over and over, it is known as CrashLoopBackOff. If the pod contains important data or you just need to edit something on the pod to get it fixed like running some checker on a program installed on the pod or moving things around or whatever the reason is but you need to get into the pod to fix it but there is no way you can just kubectl -n namespace exec -it name bash to it then what do you do? dang you CrashLoopBackOff!! initContainer method Advantage: the pod runs before the… Continue Reading


Helm charts to install the Elastic Stack using minikube

On the previous post we used the minikube wrapper kube.sh to install ECK – Elastic Cloud on Kubernetes. ECK uses an operator that was created by Elastic to deploy and orchestrate the Elastic Stack in kubernetes. ECK is not the only way to install elasticsearch in kubernetes, you can also use Helm charts to install the Stack. What is the difference between an operator and helm charts? Helm Helm is a package management system for kubernetes. The packaging format is called charts. In OS terms its like rpm or deb packages. An application is packed into a package that can… Continue Reading


minikube wrapper – kubernetes

What is minikube? Minikube was developed to allow users to run Kubernetes LOCALLY. When you run minikube it will launch a minikube host as a container/VM depending on the driver and runs a single-node k8s cluster. Why minikube? Previously whenever I needed to test anything in the kubernetes environment I would stand up a full suite of servers 4 actually, 3 workers and 1 master node on a VM and it was very time-consuming to set up and use and also resource-intensive for my tiny home lab. I needed a way to create an environment fast and make it re-producible… Continue Reading


Elastic Cloud on kubernetes (ECK) on minikube

ECK is Elastic cloud on kubernetes – Kubernetes Operator pattern that extends basic kubernetes orchestration to easily deploy, secure, upgrade Elasticsearch and the rest of the stack such as kibana, logstash, various beats, and much more. In my previous article I wrote about my kube.sh script which is a wrapper that installs a minikube environment to run your kubernetes projects. We will use the wrapper to deploy our kubernetes environment and start deploying elasticsearch using ECK. The steps below are not limited to my minikube wrapper script but you can follow the same process for any kubernetes environment. Lets get… Continue Reading