Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Add Kubernetes clustering with prometheus output docs #568

Merged
merged 3 commits into from
Apr 1, 2022

Conversation

melkypie
Copy link
Contributor

As promised in #560.

I had a question about the diagram, since it is in another branch, should I just make another pull request to that branch with the diagram added?

@karimra
Copy link
Owner

karimra commented Mar 30, 2022

Thanks a lot for the PR.
About the diagram, yes please create a PR towards branch diagrams

@@ -0,0 +1,70 @@
apiVersion: apps/v1
kind: StatefulSet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @melkypie
Great PR, thanks.
Just for my understanding, what are the benefits of a ss here vs dep?

Copy link
Contributor Author

@melkypie melkypie Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The leader of the gnmic cluster needs to be able to reach other cluster instances to assign them targets. If we used a deployment that is not possible. We can only reach other instances in a Deployment by using a Service which would randomly select a pod that is assigned to said service (this is also the reason why we need to use a headless Service ( service with clusterIP: none) for Prometheus service discovery as the DNS for a headless service will return all StatefulSet pod IPs rather than just one of them). With a StatefulSet each of the pods gets it's own specific DNS name, e.g. gnmic-ss-0.gnmic-svc.gnmic.svc.cluster.local, that allows the leader to contact each pod individually.

@karimra karimra merged commit 0b48541 into karimra:main Apr 1, 2022
@karimra
Copy link
Owner

karimra commented Apr 1, 2022

Thanks again for the PR @melkypie

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants