Open humingcheng opened 3 years ago
登录节点任意一个节点(切到root用户): CSE-servicestage_cse_etcd01 CSE-servicestage_cse_etcd02 CSE-servicestage_cse_etcd03
登录etcd容器 containerId=$(docker ps|grep cse-etcd|grep -v pause|awk '{print $1}');docker exec -it $containerId sh
查询project:
ETCDCTL_API=3 etcdctl --cacert $ETCD_CA_FILE --cert $ETCD_CERT_FILE --key $ETCD_KEY_FILE --endpoints 'https://cse-etcd-0.cse-etcd.cse.svc.cluster.local:30101,https://cse-etcd-1.cse-etcd.cse.svc.cluster.local:30101,https://cse-etcd-2.cse-etcd.cse.svc.cluster.local:30101' get --prefix '/cse-sr/projects/'
查询所有实例: ETCDCTL_API=3 etcdctl --cacert $ETCD_CA_FILE --cert $ETCD_CERT_FILE --key $ETCD_KEY_FILE --endpoints 'https://cse-etcd-0.cse-etcd.cse.svc.cluster.local:30101,https://cse-etcd-1.cse-etcd.cse.svc.cluster.local:30101,https://cse-etcd-2.cse-etcd.cse.svc.cluster.local:30101' get --prefix '/cse-sr/inst/files' --keys-only |grep -v "default/default"
调用服务中心API,查询实例数: curl -kv https://cse-service-center:30100/v4/registry/metrics
登录节点任意一个节点(切到root用户): CSE-servicestage_cse_etcd01 CSE-servicestage_cse_etcd02 CSE-servicestage_cse_etcd03
登录etcd容器 containerId=$(docker ps|grep cse-etcd|grep -v pause|awk '{print $1}');docker exec -it $containerId sh
查询project:
ETCDCTL_API=3 etcdctl --cacert $ETCD_CA_FILE --cert $ETCD_CERT_FILE --key $ETCD_KEY_FILE --endpoints 'https://cse-etcd-0.cse-etcd.cse.svc.cluster.local:30101,https://cse-etcd-1.cse-etcd.cse.svc.cluster.local:30101,https://cse-etcd-2.cse-etcd.cse.svc.cluster.local:30101' get --prefix '/cse-sr/projects/'
查询所有实例: ETCDCTL_API=3 etcdctl --cacert $ETCD_CA_FILE --cert $ETCD_CERT_FILE --key $ETCD_KEY_FILE --endpoints 'https://cse-etcd-0.cse-etcd.cse.svc.cluster.local:30101,https://cse-etcd-1.cse-etcd.cse.svc.cluster.local:30101,https://cse-etcd-2.cse-etcd.cse.svc.cluster.local:30101' get --prefix '/cse-sr/inst/files' --keys-only |grep -v "default/default"
调用服务中心API,查询实例数: curl -kv https://cse-service-center:30100/v4/registry/metrics