Using Statefulset to Maintain Pod Name

Make sure you understand StatefulSet before trying to use these YAML files. StatefulSet does not support auto-scaling, so you must write your own script to scale.

Procedure

  • To scale StatefulSet, enter the command:
    kubectl scale statefulsets theStatefulesetName -- replicas=desiredCount

    For example:

    Kubectl scale statefulsets mftis-pod --replicas=3