Hi, I deployed typesense to AWS EKS and it `/heal...
# community-help
p
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:
Copy code
> 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 <http://typesense-dev-2:8107> 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...
k
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
p
So, what is the best way to deploy typesense?
k
It's easy to deploy on plain EC2 instance(s)
p
But how do we achieve high availability?
p
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
k
Sorry we don't have operational experience with k8s. Whatever work has been done in terms of chart etc. is community driven.
p
Okay, based on this, what is the API Key?
k
API key is a key you start Typesense server with which is used for authentication
p
I got my HELM working. Thanks for the help @Kishore Nallan
👍 1