Giter VIP home page Giter VIP logo

aks-elastic's Introduction

Stateful Elastic Search Workload on Kubernetes

This repository will deploy a stateful elastic search instance on kubernetes leveraging managed application capabilities.

Deploy to Azure

Azure Kubernetes

Kubernetes Design

  • Enabled uptime SLA
  • System Node Pool (CriticalAddonsOnly)
  • User Node Pool (no state)
  • Tainted Elastic Node Pool (state)
  • Auto-scaling (Nodes not elastic)
  • CNI Networking
  • Ephemeral Disks for Node OS
  • Cluster Monitoring

ES AKS Cluster

Installation

Service Definition

Use the deploy to Azure button which creates a service definition, then deploy instances of the Elastic Stamp from the service definition.

Manual Deployment

The main.bicep deployment creates an AKS cluster with monitoring, policy and flux enabled.

Guide

1. clone the repo

git clone https://github.com/danielscholl/aks-elastic.git
cd aks-elastic

2. Deploy the infrastructure to your azure subscription

Optional - Look for and ensure VM Support for the desired VM Size in the Region. az vm list-skus --location $AZURE_LOCATION --size Standard_D --all --output table |grep none

RESOURCE_GROUP='elastic-playground'
AZURE_LOCATION='eastus2'

az group create --name $RESOURCE_GROUP --location $AZURE_LOCATION
DEPLOYMENT=$(az deployment group create -g $RESOURCE_GROUP -f main.bicep -o json)
CLUSTER_NAME=$(echo $DEPLOYMENT | jq -r '.properties.outputs.aksClusterName.value')
az aks get-credentials -n $CLUSTER_NAME -g $RESOURCE_GROUP --overwrite-existing


# Validate Nodes availability over Zones
kubectl get nodes
kubectl describe nodes -l agentpool=npsystem | grep -i topology.kubernetes.io/zone
kubectl get nodes -l purpose=elastic
kubectl describe nodes -l purpose=elastic | grep -i topology.kubernetes.io/zone
kubectl describe nodes -l purpose=elastic | grep -i agentpool

kubectl -n nginx port-forward svc/nginx-ingress-controller 8080:80 &
curl -H "Host: podinfo.staging" http://localhost:8080
{
  "hostname": "podinfo-59489db7b5-lmwpn",
  "version": "6.2.3"
}

Elastice Search

Elastic Search Design

ElasticSearch has 3 main components that make up the cluster Client/Coordinating, Masters, and Data Nodes. you can read more about what each one does in elastic public docs.

  1. Client/Coordinating Nodes Act as a reverse proxy for the clusters, this is what the external world interacts with. its deployed as a k8s deployment with horizontal pod autoscaling enabled, we will try to have a client in each node to minimize data movement across nodes, we can minimize but we can't prevent it from happening.

  2. Master Nodes stores the metadata about the data nodes, it will be deployment as a k8s deployment, ideally we need 3.

  3. Data Nodes this is where the magic is, this is where the indices are stored and replicated. this would be our Statefulset with persistent volume to persist the data.

Here is how the cluster will look like ES Cluster

aks-elastic's People

Contributors

danielscholl avatar

Watchers

James Cloos avatar  avatar

Forkers

kjayantmenon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.