https://polardbx.com/document

namespace:

kubectl create namespace polardbx-operator-system

Operator:

helm install --namespace polardbx-operator-system polardbx-operator https://github.com/ApsaraDB/galaxykube/releases/download/v1.2.1/polardbx-operator-1.2.1.tgz
#也可以通过 PolarDB-X 的 Helm Chart 仓库安装:
#helm repo add polardbx https://polardbx-charts.oss-cn-beijing.aliyuncs.com
#helm install --namespace polardbx-operator-system polardbx-operator polardbx/polardbx-operator

demo:

#包含 1 个 GMS 节点、1 个 CN 节点、1 个 DN 节点和 1 个 CDC 节点
echo "apiVersion: polardbx.aliyun.com/v1
kind: PolarDBXCluster
metadata:
  name: quick-start
  namespace: polardbx-operator-system
  annotations:
    polardbx/topology-mode-guide: quick-start" | kubectl apply -f -

quick:

apiVersion: polardbx.aliyun.com/v1
kind: PolarDBXCluster
metadata:
  name: test
  namespace: polardbx-operator-system
spec:
  topology:
    nodes:
      cn:
         replicas: 1
      dn:
         replicas: 1
      cdc:
         replicas: 1

cluster:

apiVersion: polardbx.aliyun.com/v1alpha1
kind: PolarDBXCluster
metadata:
  name: test
  namespace: polardbx-operator-system
spec:
  topology:
    cnReplicas: 2
    cnTemplate:
      image: cn-engine
      resources:
        limits:
          cpu: 2
          memory: 4Gi
    dnReplicas: 2
    dnTemplate:
      image: dn-engine
      resources:
        limits:
          cpu: 2
          memory: 4Gi

status:

kubectl -n polardbx-operator-system get polardbxcluster -w

销毁集群:

kubectl -n polardbx-operator-system delete polardbxcluster quick-start

卸载 PolarDB-X Operator

helm uninstall --namespace polardbx-operator-system polardbx-operator

删除CRD:

kubectl get crds | grep polardbx.aliyun.com

[root@node01 ~]# kubectl get crds | grep polardbx.aliyun.com
polardbxclusterknobs.polardbx.aliyun.com 2022-05-25T14:43:21Z
polardbxclusters.polardbx.aliyun.com 2022-05-25T14:43:21Z
polardbxmonitors.polardbx.aliyun.com 2022-05-25T14:43:21Z
xstores.polardbx.aliyun.com 2022-05-25T14:43:21Z

delete:

kubectl delete crds polardbxclusterknobs.polardbx.aliyun.com polardbxclusters.polardbx.aliyun.com polardbxmonitors.polardbx.aliyun.com xstores.polardbx.aliyun.com

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code