AWS EKS Annual (ElasticKubernetesService) Setup
Lucenia works beautifully on ECS / Fargate / AWS EKS. This guide will help you get started with Lucenia on AWS EKS.
Subscribe to Lucenia on the AWS Marketplace.
We release every Lucenia version on the AWS Marketplace, updating is as simple as upgrading to the newest container.
Prerequisite
- An EKS Cluster
- Storage Driver on EKS Cluster - Lucenia Helm Chart defaults to
storageClass: gp2
backed by EBS CSI - An AWS Marketplace Annual Subscription to Lucenia and an AWS Marketplace Agreement ID. This usually starts with
agmt-
and can be found in the AWS Marketplace console under the “Contracts” section or in your confirmation email.
Install Lucenia Annual on EKS
Setup
Update your KubeConfig to point to your EKS cluster.
aws eks --region [EKS-REGION] update-kubeconfig --name [EKS-CLUSTER-NAME]
> Added new context arn:aws:eks:us-east-1:[YOUR-ACCOUNT-ID]:cluster/[EKS-CLUSTER-NAME] to /Users/you/.kube/config
Test you Cluster Connectivity
kubectl get svc
> NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AG
> kubernetes ClusterIP 10.100.0.1 443/TCP 3h34m
Run these few setup commands:
- Set a
NS
environment variable with the value of the namespace to deploy the Lucenia Cluster to:
export NS=<lucenia_namespace>
- Create the namespace:
kubectl create namespace $NS
- Create the Service Account
export SERVICE_ACCOUNT_NAME=lucenia-sa
eksctl create iamserviceaccount \
--name $SERVICE_ACCOUNT_NAME \
--namespace $NS \
--cluster <ENTER_YOUR_CLUSTER_NAME_HERE> \
--attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \
--approve \
--override-existing-serviceaccounts
You will need to set custom values for your helm deployment in a myvalues.yaml
file. You will need to update the value for agreement_id
. Here is an example of a myvalues.yaml
file:
lucenia:
config:
lucenia.yml: |
cluster.name: lucenia-cluster
network.host: 0.0.0.0
plugins:
aws:
agreement_id: <agmt-CHANGE_ME>
Install Lucenia with Helm
export HELM_EXPERIMENTAL_OCI=1
aws ecr get-login-password \
--region us-east-1 | helm registry login \
--username AWS \
--password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com
helm pull oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/lucenia/lucenia-annual-chart --version=0.1.19
tar -xvf lucenia-annual-chart-0.1.19.tgz
export LUCENIA_INITIAL_ADMIN_PASSWORD=$(openssl rand -base64 32)
helm install lucenia \
--namespace $NS ./lucenia-annual-chart \
--set 'lucenia.extraEnvs[0].name=LUCENIA_INITIAL_ADMIN_PASSWORD' \
--set 'lucenia.extraEnvs[0].value='${LUCENIA_INITIAL_ADMIN_PASSWORD} \
-f myvalues.yaml
This will default to a service account of lucenia-cluster-manager
. If you would like to override the service account with the one created above, you can do so by setting the lucenia.rbac.serviceAccountName=<change_me>
value in the Helm install command and lucenia.rbac.create=false
.
helm install lucenia \
--namespace $NS ./lucenia-annual-chart \
--set 'lucenia.extraEnvs[0].name=LUCENIA_INITIAL_ADMIN_PASSWORD' \
--set 'lucenia.extraEnvs[0].value='${LUCENIA_INITIAL_ADMIN_PASSWORD} \
--set 'lucenia.rbac.create=false' \
--set 'lucenia.rbac.serviceAccountName='${SERVICE_ACCOUNT_NAME} \
-f myvalues.yaml
Access Lucenia
On a successful deployment, Lucenia will start on port 9200. You can access it using the following commands:
Get the application URL by running these commands:
export POD_NAME=$(kubectl get pods --namespace $NS -l "app.kubernetes.io/name=lucenia,app.kubernetes.io/instance=lucenia" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:9200 to use your application"
kubectl --namespace $NS port-forward $POD_NAME 9200:9200
Now issue this command to see cluster health:
curl -XGET https://localhost:9200/_cluster/health?pretty -ku admin:$LUCENIA_INITIAL_ADMIN_PASSWORD
The output should be similar to:
{
"cluster_name" : "lucenia-cluster",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 3,
"number_of_data_nodes" : 3,
"discovered_master" : true,
"discovered_cluster_manager" : true,
"active_primary_shards" : 2,
"active_shards" : 5,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
You can now visit our docs on how to ingest data to learn more about Lucenia.
Get Help!
If you have any questions, please reach out to us at support@lucenia.io or join our Slack Community.