Building a Search Engine on Google Kubernetes Engine

A presentation at DevFest Bangalore in September 2019 in Bengaluru, Karnataka, India by Aravind Putrevu

Slide 1

Slide 1

Building a Search Engine on GKE Aravind Putrevu @aravindputrevu | aravind.dev 1

Slide 2

Slide 2

{ “name”: “Aravind Putrevu”, “title”: “Developer Advocate”, “company”: “Elastic”, “personal_website”: “aravind.dev”, “social_media”: { “twitter”: “@aravindputrevu”, “linkedin”: “Aravind Putrevu” } } 2

Slide 3

Slide 3

Search is a constant/foundation 3

Slide 4

Slide 4

4

Slide 5

Slide 5

5

Slide 6

Slide 6

6

Slide 7

Slide 7

7

Slide 8

Slide 8

Users across various industries, segments, and geographies TECHNOLOGY 8 FINANCE TELCO CONSUMER HEALTHCARE PUBLIC SECTOR AUTOMOTIVE / TRANSPORTATION RETAIL

Slide 9

Slide 9

Search is a constant/foundation

Slide 10

Slide 10

Elastic Stack aka ELK 10

Slide 11

Slide 11

Elastic Stack SOLUTIONS Kibana Visualize & Manage Elasticsearch Store, Search, & Analyze Elastic Stack Beats SaaS Elastic cloud 11 Logstash SELF-MANAGED Elastic cloud Enterprise Standalone Ingest

Slide 12

Slide 12

Elasticsearch Heart of the Elastic Stack Distributed, Scalable High-availability Multi-tenancy Developer Friendly Real-time, Full-text Search Aggregations 1 2

Slide 13

Slide 13

apps meta content Index

Slide 14

Slide 14

apps meta content Shards

Slide 15

Slide 15

Deploying Search… 15

Slide 16

Slide 16

Where to deploy? Self-managed 16 Cloud Infra Managed Service

Slide 17

Slide 17

17

Slide 18

Slide 18

$> docker pull elasticsearch 18

Slide 19

Slide 19

19

Slide 20

Slide 20

20 ● Open-sourced by Google ● Undisputed leader in Container Orchestration ● Go to platform for Microservices based architecture ● Google’s Kubernetes Engine

Slide 21

Slide 21

Kubernetes architecture etcd apiserver apiserver apiserver Controllers Controllers Controllers controllers user kubelet Node 21 kubelet Node kubelet Node

Slide 22

Slide 22

22

Slide 23

Slide 23

github.com/elastic/cloud-on-k8s 23

Slide 24

Slide 24

● Custom Resources Definitions (CRD) ○ Elastic Cloud on Kubernetes 24 Elasticsearch, Kibana, APM ● A set of controllers ● Automate Tasks ○ Generate TLS certificates ○ Create Secrets holding configuration & certs ○ Create a Service to access the cluster ○ Create ES users

Slide 25

Slide 25

Few Commands $> kubectl apply -f https://download.elastic.co/downloads/eck/0.9.0/all-in-one.yaml $> cat <<EOF | kubectl apply -f apiVersion: elasticsearch.k8s.elastic.co/v1alpha1 kind: Elasticsearch metadata: name: quickstart spec: version: 7.2.0 nodes: - nodeCount: 1 config: node.master: true node.data: true node.ingest: true EOF 25

Slide 26

Slide 26

26

Slide 27

Slide 27

Questions? 27

Slide 28

Slide 28

ela.st/eck-gke 28