hello云胜

技术与生活

0%

有状态应用 StatefulSet

难点:网络不变,存储不变,顺序不变

网络:

恒定的网络标识,通过无头service实现

headless service ClusterIP:None 不分配ip

业务pod访问使用:mysql-0.svc名,namespace名.svc.cluster.local

存储:

共享

顺序:

顺序性保证

statefulset创建的pod会加上顺序编号

启动和删除都会按顺序来