Query XStore List

To query the list of all Data Nodes (DN), execute the following command:

kubectl get xstore -l polardbx/name={instance name}

The output will be as follows:

NAME                  LEADER                       READY   PHASE     DISK       VERSION   AGE
tunan-oss-drsg-dn-0   tunan-oss-drsg-dn-0-cand-1   3/3     Running   11.7 GiB   8.0.18    20d
tunan-oss-drsg-dn-1   tunan-oss-drsg-dn-1-cand-1   3/3     Running   11.0 GiB   8.0.18    20d

The PHASE displays the status of each DN, and the LEADER shows the current Leader pod for the DN.

View DN Pod

To view all the pods for PolarDB-X DN, execute the following command:

kubectl get pod -l polardbx/name={instance name},polardbx/role=dn

The result will be as follows:

NAME                         READY   STATUS    RESTARTS   AGE
tunan-oss-drsg-dn-0-cand-0   3/3     Running   0          20d
tunan-oss-drsg-dn-0-cand-1   3/3     Running   0          20d
tunan-oss-drsg-dn-0-log-0    3/3     Running   0          20d
tunan-oss-drsg-dn-1-cand-0   3/3     Running   0          20d
tunan-oss-drsg-dn-1-cand-1   3/3     Running   0          20d
tunan-oss-drsg-dn-1-log-0    3/3     Running   0          20d

To view the role of each DN pod, execute the following command:

kubectl get pod -l polardbx/name={instance name},polardbx/role=dn --show-labels

The following output will be obtained, where xstore/role=follower indicates the pod's role.

Note: If the xstore/role tag is not valued, it indicates that the DN is in the process of leader election or there is a problem with the leader election.

NAME                         READY   STATUS    RESTARTS   AGE   LABELS
tunan-oss-drsg-dn-0-cand-0   3/3     Running   0          20d   polardbx/dn-index=0,polardbx/name=tunan-oss,polardbx/rand=drsg,polardbx/role=dn,xstore/generation=2,xstore/name=tunan-oss-drsg-dn-0,xstore/node-role=candidate,xstore/node-set=cand,xstore/pod=tunan-oss-drsg-dn-0-cand-0,xstore/port-lock=16148,xstore/role=follower

View DN pods with Specific Roles

To view all leader pods:

kubectl get pod -l polardbx/name={instance name},polardbx/role=dn,xstore/role=leader

To view all follower pods:

kubectl get pod -l polardbx/name={instance name},polardbx/role=dn,xstore/role=follower

To view all logger pods:

kubectl get pod -l polardbx/name={instance name},polardbx/role=dn,xstore/role=logger

results matching ""

    No results matching ""