Skip to content

Latest commit

 

History

History
103 lines (80 loc) · 6.14 KB

File metadata and controls

103 lines (80 loc) · 6.14 KB
title kbcli cluster update

Update the cluster settings, such as enable or disable monitor or log.

kbcli cluster update NAME [flags]

Examples

  # update cluster mycluster termination policy to Delete
  kbcli cluster update mycluster --termination-policy=Delete
  
  # enable cluster monitor
  kbcli cluster update mycluster --monitor=true
  
  # update cluster tolerations
  kbcli cluster update mycluster --tolerations='"key=engineType,value=mongo,operator=Equal,effect=NoSchedule","key=diskType,value=ssd,operator=Equal,effect=NoSchedule"'
  
  # edit cluster
  kbcli cluster update mycluster --edit
  
  # enable cluster monitor and edit
  # kbcli cluster update mycluster --monitor=true --edit
  
  # enable cluster auto backup
  kbcli cluster update mycluster --backup-enabled=true
  
  # update cluster backup retention period
  kbcli cluster update mycluster --backup-retention-period=1d
  
  # update cluster backup method
  kbcli cluster update mycluster --backup-method=snapshot
  
  # update cluster backup cron expression
  kbcli cluster update mycluster --backup-cron-expression="0 0 * * *"
  
  # update cluster backup starting deadline minutes
  kbcli cluster update mycluster --backup-starting-deadline-minutes=10
  
  # update cluster backup repo name
  kbcli cluster update mycluster --backup-repo-name=repo1
  
  # update cluster backup pitr enabled
  kbcli cluster update mycluster --pitr-enabled=true

Options

      --allow-missing-template-keys            If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
      --backup-cron-expression string          the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron.
      --backup-enabled                         Specify whether enabled automated backup
      --backup-method string                   the backup method, view it by "kbcli cd describe <cluster-definition>", if not specified, the default backup method will be to take snapshots of the volume
      --backup-repo-name string                the backup repository name
      --backup-retention-period string         a time string ending with the 'd'|'D'|'h'|'H' character to describe how long the Backup should be retained (default "1d")
      --backup-starting-deadline-minutes int   the deadline in minutes for starting the backup job if it misses its scheduled time for any reason
      --disable-exporter                       Enable or disable monitoring (default true)
      --dry-run string[="unchanged"]           Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource. (default "none")
      --edit                                   Edit the API resource
  -h, --help                                   help for update
  -o, --output string                          Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).
      --pitr-enabled                           Specify whether enabled point in time recovery
      --runtime-class-name string              Specifies runtimeClassName for all Pods managed by this Cluster.
      --show-managed-fields                    If true, keep the managedFields when printing objects in JSON or YAML format.
      --template string                        Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
      --termination-policy string              Termination policy, one of: (DoNotTerminate, Delete, WipeOut) (default "Delete")
      --tolerations strings                    Tolerations for cluster, such as "key=value:effect, key:effect", for example '"engineType=mongo:NoSchedule", "diskType:NoSchedule"'

Options inherited from parent commands

      --as string                      Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
      --as-group stringArray           Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --as-uid string                  UID to impersonate for the operation.
      --cache-dir string               Default cache directory (default "$HOME/.kube/cache")
      --certificate-authority string   Path to a cert file for the certificate authority
      --client-certificate string      Path to a client certificate file for TLS
      --client-key string              Path to a client key file for TLS
      --cluster string                 The name of the kubeconfig cluster to use
      --context string                 The name of the kubeconfig context to use
      --disable-compression            If true, opt-out of response compression for all requests to the server
      --insecure-skip-tls-verify       If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string              Path to the kubeconfig file to use for CLI requests.
      --match-server-version           Require server version to match client version
  -n, --namespace string               If present, the namespace scope for this CLI request
      --request-timeout string         The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
  -s, --server string                  The address and port of the Kubernetes API server
      --tls-server-name string         Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
      --token string                   Bearer token for authentication to the API server
      --user string                    The name of the kubeconfig user to use

SEE ALSO

Go Back to CLI Overview Homepage.