#community-help

Issues deploying Typesense to AWS EKS

TLDR Pavan had issues when deploying Typesense to AWS EKS. Kishore Nallan suggested deployment to plain EC2 instances and provided the API key information. Eventually, Pavan resolved the issue with Helm.

Powered by Struct AI

1

Aug 03, 2022 (17 months ago)
Pavan
Photo of md5-62874fefc4301175b2c7853a875ef2f3
Pavan
10:24 AM
Hi,

I deployed typesense to AWS EKS and it /health was giving {ok:true}

But when I tried to access, curl 'http://xyz:8108/keys' -X GET -H "X-TYPESENSE-API-KEY: MySuperstrongpassword#6876876578", all my pods went into Error. Here are the pod logs:

> kubectl logs typesense-dev-2                   
I20220803 10:20:41.334745     1 typesense_server_utils.cpp:352] Starting Typesense 0.23.1
I20220803 10:20:41.334774     1 typesense_server_utils.cpp:355] Typesense is using jemalloc.
I20220803 10:20:41.334929     1 typesense_server_utils.cpp:404] Thread pool size: 16
I20220803 10:20:41.336777     1 store.h:61] Initializing DB by opening state dir: /usr/share/typesense/data/db
I20220803 10:20:41.348294     1 store.h:61] Initializing DB by opening state dir: /usr/share/typesense/data/meta
I20220803 10:20:41.359787     1 typesense_server_utils.cpp:486] Starting API service...
I20220803 10:20:41.359961     1 http_server.cpp:177] Typesense has started listening on port 8108
I20220803 10:20:41.359997   103 batched_indexer.cpp:120] Starting batch indexer with 16 threads.
I20220803 10:20:41.360364   103 batched_indexer.cpp:126] BatchedIndexer skip_index: -9999
I20220803 10:20:41.363009   102 server.cpp:1045] Server[braft::RaftStatImpl+braft::FileServiceImpl+braft::RaftServiceImpl+braft::CliServiceImpl] is serving on port=8107.
I20220803 10:20:41.363023   102 server.cpp:1048] Check out  in web browser.
E20220803 10:20:41.391083   102 raft_server.cpp:169] Unable to resolve host: typesense-0.ts.typesense.svc.cluster.local
E20220803 10:20:41.407008   102 raft_server.cpp:169] Unable to resolve host: typesense-1.ts.typesense.svc.cluster.local
E20220803 10:20:41.415683   102 raft_server.cpp:169] Unable to resolve host: typesense-2.ts.typesense.svc.cluster.local
E20220803 10:20:41.415729   102 configuration.cpp:43] Fail to parse typesense-0.ts.typesense.svc.cluster.local:8107:8108
E20220803 10:20:41.415732   102 raft_server.cpp:51] Failed to parse nodes configuration: `typesense-0.ts.typesense.svc.cluster.local:8107:8108,typesense-1.ts.typesense.svc.cluster.local:8107:8108,typesense-2.ts.typesense.svc.cluster.local:8107:8108` --  will retry shortly...
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:26 AM
Typesense deployment on k8s has some quirks because the raft library we are using supports only raw IPs. See this comment and the comment above in the issue for details: https://github.com/typesense/typesense/issues/465#issuecomment-1173536082
Pavan
Photo of md5-62874fefc4301175b2c7853a875ef2f3
Pavan
10:30 AM
So, what is the best way to deploy typesense?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:31 AM
It's easy to deploy on plain EC2 instance(s)
Pavan
Photo of md5-62874fefc4301175b2c7853a875ef2f3
Pavan
10:32 AM
But how do we achieve high availability?
Pavan
Photo of md5-62874fefc4301175b2c7853a875ef2f3
Pavan
10:40 AM
But, can you help me figure out the issue that I;m facing with K8s?

I followed https://raw.githubusercontent.com/typesense/typesense-kubernetes/master/base/install.yaml
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:50 AM
Sorry we don't have operational experience with k8s. Whatever work has been done in terms of chart etc. is community driven.
Pavan
Photo of md5-62874fefc4301175b2c7853a875ef2f3
Pavan
11:03 AM
Okay, based on this, what is the API Key?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:33 PM
API key is a key you start Typesense server with which is used for authentication
Aug 04, 2022 (17 months ago)
Pavan
Photo of md5-62874fefc4301175b2c7853a875ef2f3
Pavan
07:09 AM
I got my HELM working. Thanks for the help Kishore Nallan

1

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community