Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primary change periodically #1629

Open
cybercoder opened this issue Oct 14, 2024 · 1 comment
Open

Primary change periodically #1629

cybercoder opened this issue Oct 14, 2024 · 1 comment
Labels

Comments

@cybercoder
Copy link

I don't know this is a bug or not.
I have created a NodePort service to the 0 instance in replicaset statefulset for external temporary connections.

apiVersion: v1
kind: Service
metadata:
  labels:
    app: mongodb-svc
  name: mongodb-svc-nodeport
  namespace: db
spec:
  ports:
  - name: mongodb
    nodePort: 30017
    port: 27017
    protocol: TCP
    targetPort: 27017
  selector:
    statefulset.kubernetes.io/pod-name: mongodb-0
  type: NodePort

But the primary node periodically changes! ( maybe voting ... )
How we can commit the 0 instance being the primary always in the replicaset?

Copy link
Contributor

This issue is being marked stale because it has been open for 60 days with no activity. Please comment if this issue is still affecting you. If there is no change, this issue will be closed in 30 days.

@github-actions github-actions bot added the stale label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant