reactive-tech / kubegres

Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.
https://www.kubegres.io
Apache License 2.0
1.32k stars 74 forks source link

How to check which pod is in "Primary state" #47

Closed nicraMarcin closed 3 years ago

nicraMarcin commented 3 years ago

Hi, How to check with kubectl get pod ... display information about master and replicas pods?

alex-arica commented 3 years ago

Thank you for your message. Please try this command:

For Primary pod (master pod):

kubectl get pods  -l replicationRole=primary

For Replica pod(s):

kubectl get pods  -l replicationRole=replica