场景
- K8s 场景 tidb-server 需要 hotfix
目的
- 异构测试一段时间,避免出现比 Hotfix 前更严重的问题
K8s 场景
kubectl get tc -n cluster-name-ryl
kubectl get pod -n cluster-name-ryl -o wide
[root@m4136 ryl]# more cluster.yaml (展示的缩进有问题)
apiVersion: pingcap.com/v1alpha1
kind: TidbCluster
metadata:
name: tidboperator-ryl-new
spec:
configUpdateStrategy: RollingUpdate
version: v4.0.9
timezone: UTC
pvReclaimPolicy: Delete
discovery: {}
cluster:
name: tidboperator-ryl
tidb:
baseImage: pingcap/tidb
replicas: 1
requests:
cpu: “100m”
config: {}
storageClassName: “local-storage”
kubectl apply -f cluster.yaml -n cluster-name-ryl
kubectl get tc -n cluster-name-ryl
kubectl get pod -n cluster-name-ryl -o wide
kubectl get service -n cluster-name-ryl
- 集群内部访问
- 修改 ClusterIP 为 NodsPort
- port-forward 待确认
kubectl edit tc -n cluster-name-ryl
watch kubectl get pod -n cluster-name-ryl 观察待缩容成功
kubectl get tc -n cluster-name-ryl
kubectl delete tc tidboperator-ryl-new -n cluster-name-ryl