Skip to content

Create a StatefulSet ​

Deploy stateful applications (databases, message queues, etc.) using a StatefulSet. Each Pod gets a stable network identity and ordered deployment.

Prerequisites

  • Target Namespace exists.
  • For persistent storage, ensure a PersistentVolume or StorageClass is available.

Step 1. Open the Create form ​

  1. In the left menu, select Workloads → StatefulSets.
  2. Click Create StatefulSet in the top-right corner.
  3. Select Create as form from the dropdown.

Step 2. Configure the StatefulSet ​

FieldDescriptionExample
NameStatefulSet namemysql
NamespaceTarget Namespacedefault
ReplicasNumber of Pod replicas3
Service NameHeadless Service name (for network identity)mysql-svc

Step 3. Configure the Container and Volumes ​

In the Container section, set the image and port:

FieldDescriptionExample
ImageContainer imagemysql:8.0
Container PortPort the container listens on3306
Environment VariablesKey=value pairsMYSQL_ROOT_PASSWORD=secret

In the Volume Claim Templates section, configure the PVC template for each Pod:

FieldDescriptionExample
Storage ClassStorageClass to use for the PVCstandard
Access ModePVC access modeReadWriteOnce
StorageStorage capacity10Gi
Mount PathMount path inside the container/var/lib/mysql

INFO

PVCs created from Volume Claim Templates are unique per Pod. (e.g., data-mysql-0, data-mysql-1)


Step 4. Create and verify ​

Click Create.

The StatefulSet is ready when the Ready count in the list matches the configured replica count.

Pod naming convention: [statefulset-name]-0, [statefulset-name]-1, ...


Next steps ​

The New Standard for AI Infrastructure