7. kubectl delete statefulset nfs-pvc-sts를 실행해 스테이트풀셋의 파드가 삭제합니다. 파드는 생성된 순서의 역순으로 삭제되는데, kubectl get pods -w를 실행하면 삭제되는 과정을 볼 수 있습니다.
[root@m-k8s ~]# kubectl delete statefulset nfs-pvc-sts
statefulset.apps "nfs-pvc-sts" deleted
[root@m-k8s ~]# kubectl get pods -w
NAME READY STATUS RESTARTS AGE
nfs-pvc-sts-0 0/1 Terminating 0 13m
nfs-pvc-sts-1 0/1 Terminating 0 13m
nfs-pvc-sts-2 0/1 Terminating 0 13m
nfs-pvc-sts-3 0/1 Terminating 0 13m
nfs-pvc-sts-3 0/1 Terminating 0 13m
nfs-pvc-sts-3 0/1 Terminating 0 13m
nfs-pvc-sts-1 0/1 Terminating 0 13m
nfs-pvc-sts-1 0/1 Terminating 0 13m
nfs-pvc-sts-2 0/1 Terminating 0 13m
nfs-pvc-sts-2 0/1 Terminating 0 13m
nfs-pvc-sts-0 0/1 Terminating 0 13m
nfs-pvc-sts-0 0/1 Terminating 0 13m