Elastic Cloud on Kubernetes

We had the opportunity to migrate Elastic Cloud Enterprise running on bare metal to Azure. Initially we were going to spin up 3-5 VMs and install ECE with the Ansible role but then we found ECK and made our lives way easier. Migrating was very easy following Elastic’s documentation and video posted here but we had a little trouble configuring the snapshots with an Azure Storage account that had a private link so in this article we share how we got it done.

Note: My storage account has a private link inside the same subnet as the AKS cluster to avoid hops, firewalls and keep traffic local to the subnet.

1. Get the Storage name and account key and encode to base64

Note: Important to encode the Account Name and Key to base64

First get the storage name account and key with:

az storage account show-connection-string --resourcegroup RG-Name --name StorageAccountName

Then output the values to base64 format in the Azure CLI:

echo -n 'StorageAccountName' | base64
echo -n 'StorageAccountKey' | base64

2. Create the yaml declaration, with the base64 values, to commit the secret as a resource.

3. Add the secret to the deployment and install the Azure repo plugin with an init container if you don’t have a pre built image that contains the plugin.

4. Once containers come back online head over to kibana –> management — Snaphots and Restore –> Repositories

Plugin will be available after the init container installs

5. Create a snapshot policy and click run now to test

Sources and Documentation

One of the best things on working with ElasticSearch is their documentation and youtube channel, they do a great job in adding value to their technologies. A good example is the Elastic Cloud Kubernetes Operator which automates a lot of the admin tasks that need to happen to get a deployment fully configured.

Documentation: https://www.elastic.co/guide/en/cloud-on-k8s/current/index.html