Deploy Dgraph in to k8s cluster alongside with application that will store data into it. I want to reduce the footprint of the solution as much as possible and thought to myself if dgraph microservices can be deployed in pod. For example pod dgraph-1 contains two containers dgraph-alpha-1 and dgraph-zero-1.
Is it possible? Someone tried? Can it even work ?
Thank you for considering Dgraph. While it is technically possible to do so, it is generally not recommended as it can lead to scalability and maintainability issues in the long run. It is better to have separate pods for each application, so they can be managed independently and scaled as needed. I hope this helps clarify the best practice for deploying applications on Kubernetes.
You could use the dgraph/standalone image which contains a Zero and an Alpha instance running in the same container. However, clustering is not possible with this approach. Perhaps, if you create a standalone script that somehow manages the entry and exit of Dgraph nodes as you scale your cluster, it could work. But, it seems like a complex solution to maintain. I would not recommend it.