k8s list-statefulsets
Get k8s statefulsets
Description
Get the kubernetes statefulsets that satisfies the provided arguments
Synopsis
k8s list-statefulsets
[--site <site>]
[--cluster <cluster>]
[--namespace|-n <namespace>]
[<selector>]
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Cluster where this command will be executed
Example: --cluster "in-cluster"
Default: in-cluster
Attributes: optional
namespace
- (string)
Kubernetes namespace
Example: --namespace "namespace-1"
Default: default
Attributes: optional
selector
- (string)
Selector to select statefulsets
Example: "app=k8s,!test"
Default: _None_
Attributes: optional
Examples
Input:
Output:[
{
"cluster": "in-cluster",
"namespace": "default",
"name": "cassandra",
"labels": {
"app": "cassandra",
"app.kubernetes.io/managed-by": "Helm",
"chart": "cassandra-0.14.3",
"heritage": "Helm",
"release": "temporaltest"
},
"annotations": {
"autopilot.gke.io/resource-adjustment": "{\"input\":{\"containers\":[{\"name\":\"temporaltest-cassandra\"}]},\"output\":{\"containers\":[{\"limits\":{\"cpu\":\"500m\",\"ephemeral-storage\":\"1Gi\",\"memory\":\"2Gi\"},\"requests\":{\"cpu\":\"500m\",\"ephemeral-storage\":\"1Gi\",\"memory\":\"2Gi\"},\"name\":\"temporaltest-cassandra\"}]},\"modified\":true}",
"meta.helm.sh/release-name": "test",
"meta.helm.sh/release-namespace": "default"
},
"status": {
"replicas": 1,
"updated_replicas": 1
},
"creation_time_millis": 1632240106000
}
]
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "read" |
Service Type | "k8s" |
Service Instance | cluster |
Namespace | namespace |
Object Type | "statefulset" |
Object ID |
Please see Access Control for details.