Skip to content

k8s update-statefulset

Update k8s statefulset

Description

Update k8s statefulset with the provided labels and annotations

Synopsis

k8s update-statefulset
    [--site <site>]
    [--cluster <cluster>]
    [--namespace|-n <namespace>]
    <name>
    [--labels <labels>]
    [--annotations <annotations>]

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

name - (string)

     Name of the statefulset to be updated
     Example: "name-1"
     Default: _None_      Attributes: required

labels - (string)

     labels that are to be merged with existing ones
     Example: --labels "{"label1":"val1"}"
     Default: _None_      Attributes: optional

annotations - (string)

     annotations that are to be merged with existing ones
     Example: --annotations "{"ann1":"val1"}"
     Default: _None_      Attributes: optional

Examples

Input:

! k8s update-statefulset --labels `{"abc":"defg","zxc":"vbn"}` --annotations `{"ccc":"fsfd"}` "web"
Output:
statefulset web updated

Access Control

To use this command, you need access to the following:

Field Value
Action "update"
Service Type "k8s"
Service Instance cluster
Namespace namespace
Object Type "statefulset"
Object ID name

Please see Access Control for details.