OpenShift - List stateful sets using the oc list statefulsets command

by
Jeremy Canfield |
Updated: April 15 2024
| OpenShift articles
There are various ways to deploy pods.
- from a replica set
- from a replication controller
- from a stateful set (this article)
A stateful set is a resource in OpenShift that is used to deploy one or more pods running a stateful application (an application that keeps track of the state of something), such as the state of a connection to some backend, such as a SQL database.
The oc get statefulsets command can be used to list the stateful sets in the currently selected project / namespace.
TIP
The -A or --all-namespaces flag can be used to list the replica sets in every project / namespace.
The -n or --namespace flag can be used to list the replica sets in a certain project / namespace.
~]$ oc get statefulsets
NAME READY AGE
my-stateful-set-foo 2/2 16d
my-stateful-set-bar 2/2 629d
Did you find this article helpful?
If so, consider buying me a coffee over at