I have created statefulset of mysql using below yaml with kubectl apply -f mysql-statefulset.yaml:
kubectl apply -f mysql-statefulset.yaml
apiVersion: v1 kind: Service metadata: name: mys