cd /tmp rm-rf linux-amd64 wget https://get.helm.sh/helm-v3.8.1-linux-amd64.tar.gz tar xzvf helm-v3.8.1-linux-amd64.tar.gz cd linux-amd64 mv helm /usr/local/bin/ chmod 755 /usr/local/bin/helm
克隆percona-helm-charts这个项目
1 2 3
cd /opt/ git clone https://github.com/percona/percona-helm-charts.git cd percona-helm-charts
安装pxc-operator
1 2 3 4 5 6
cd charts/pxc-operator # 替换镜像为自己仓库的镜像 sed -i's/^operatorImageRepository.*/operatorImageRepository: registry.cn-hangzhou.aliyuncs.com\/lcc-middleware\/percona-xtradb-cluster-operator/g' values.yaml
# Helm 安装Operator helm install pxc-operator .
安装pxc-db
Note: MySQL 5.7 Binlog 不可用
MySQL 5.7 和 MySQL 8.0 根据业务形态和需求选择安装即可. 其中haproxy.enabled 和 proxysql.enabled 字段不能同时为true,原因参见官方文档.
更换私有仓库
1 2
cd /opt/percona-helm-charts/pxc-db/ sed -i's/^operatorImageRepository.*/operatorImageRepository: registry.cn-hangzhou.aliyuncs.com\/lcc-middleware\/percona-xtradb-cluster-operator/g' production-values.yaml
... secrets: ## You should be overriding these with your own. passwords: # 记得修改自己的密码 root:entry-your-password xtrabackup:entry-your-password monitor:entry-your-password clustercheck:entry-your-password proxyadmin:entry-your-password pmmserver:entry-your-password operator:entry-your-password replication:entry-your-password ...