How to configure a distributed hashtable on Kubernetes?

5/23/2018

My application is running in Kubernetes pods and I would like to use golang/groupcache to distribute key/value entities amongst instances of the app.

The groupcache library in each of my app instances is required to know the connection details (IP & port) of all the other app instances so it can distribute the key/value entities as it sees fit. How can I let groupcache know the connection details of the other running instances of my application? Would it be preferable/possible to use the Kubernetes Go Client Library?

-- Dan
go
google-kubernetes-engine
kubernetes

1 Answer

5/24/2018

Go Client Library is one of the options. Another (more simple) option is to setup a headless service for groupcache, so with a single DNS lookup you can get all IP addresses of all groupcache pods.

-- Alexandr Lurye
Source: StackOverflow