跳到主要内容

部署多实例有状态应用

借助 StatefulSet 控制器部署多实例有状态应用。

这里用 mysql 做例子。

准备

You need to either have a dynamic PersistentVolume provisioner with a default StorageClass, or statically provision PersistentVolumes yourself to satisfy the PersistentVolumeClaims used here.

This tutorial assumes you are familiar with PersistentVolumes and StatefulSets, as well as other core concepts like Pods, Services, and ConfigMaps.

参考