polardbxoperatordocs/faq/17-one-replica-cluster.md

56 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

在yaml 中添加 .spec.topology.rules.components 配置gms 和 dn 的 nodesets即可如下所示
```yaml
apiVersion: polardbx.aliyun.com/v1
kind: PolarDBXCluster
metadata:
name: pxc-demo
spec:
topology:
rules:
components:
gms:
## 配置nodeSets即可
nodeSets:
- name: cands
role: Candidate
replicas: 1
dn:
## 配置nodeSets即可
nodeSets:
- name: cands
role: Candidate
replicas: 1
nodes:
gms:
template:
resources:
limits:
cpu: 2
memory: 4Gi
cn:
replicas: 1
template:
resources:
requests:
cpu: 1
memory: 4Gi
limits:
cpu: 2
memory: 4Gi
dn:
replicas: 1
template:
resources:
limits:
cpu: 2
memory: 4Gi
cdc:
replicas: 1
template:
resources:
limits:
cpu: 2
memory: 4Gi
```