tanzu operations cluster

Plugin for operating clusters in the organization

Three Tanzu CLI plugins provide commands under tanzu cluster based on different targets:

  • kubernetes target: see tanzu cluster
  • operations target: see below
  • mission-control target: see cluster in the Tanzu Mission Control Pug-ins documentation

Usage

CLI plugin: cluster | Target: operations | Primarily used for: Platform operations | Release Notes

Syntax:

  tanzu operations cluster [command]

Commands

  attach            Attach an existing cluster
  create            Create a cluster
  delete            Delete a cluster
  extension         Cluster addons for the platform.
  get               Get details from a cluster
  kubeconfig        Service fetches kubeconfig for clusters
  list              List clusters
  logs              Archive the logs of Tanzu Mission Control components present in the cluster
  managed-resources Managed kubernetes resources
  reattach          Reattach an existing cluster
  template          Policy CLI template
  update            Update (overwrite) a cluster
  validate          Prints report of components present in the cluster

Global Flags

  -h, --help   help for cluster command

attach

Attach an existing cluster

Usage

  tanzu operations cluster attach [flags]

Flags

      --continue-bootstrap   continue bootstrap to apply the Tanzu Mission Control resource manifest to complete attaching
  -f, --file string          resource file from which to attach the cluster
      --force                clean up the Tanzu Misson Control resources of a partially detached/attached cluster
  -k, --kubeconfig string    the kubeconfig file of the actual cluster to use for applying the Tanzu Mission Control resource manifest
  -n, --name string          name of the cluster. Used in conjunction with --continue-bootstrap flag
  -o, --output string        output file to write the Tanzu Mission Control resource manifest (default "k8s-attach-manifest.yaml")
      --skip-verify          skip the post-flight checks that confirms if the cluster attach was successful

Example

$ cat cluster_attach.yaml
fullName:
  managementClusterName: attached
  provisionerName: attached
  name: cluster1
meta:
  description: Attaching cluster using tanzu cli
spec:
  clusterGroupName: cgroup1

$ tanzu operations cluster attach --file cluster_attach.yaml --kubeconfig /path/to/kubeconfig.yaml
  running pre-flight checks
  cluster "cluster1" is being created
  Resources applied to the cluster successfully
  running post-flight attach checks
  cluster cluster1 successfully attached

create

Create a cluster

Usage

  tanzu operations cluster create [flags]

Flags

  -v, --data-values-file string   data values file to use
      --dry-run                   create the data model only, do not apply to server
  -f, --file string               Resource file from which to create a cluster
  -t, --template string           template to use (default "default")

delete

Delete a cluster

Usage

  tanzu operations cluster delete CLUSTER_NAME [flags]

Flags

  -t, --cluster-type string   type of the cluster (eks/attached)
  -f, --force                 force delete a cluster

Example

$ tanzu operations cluster delete cluster1 --cluster-type attached
  Deleting cluster...
  Cluster is being detached

extension

Cluster addons for the platform.

Usage

  tanzu operations cluster extension [command]

Commands

  get         Retrieve an extension object
  list        Return a list of extensions

extension get

Retrieve an extension object

Usage

  tanzu operations cluster extension get EXTENSION_NAME [flags]

Flags

      --cluster-name string   name of the cluster
  -t, --cluster-type string   type of the cluster (eks/attached)
  -o, --output string         output format (yaml | json) (default "yaml")

extension list

Return a list of extensions

Usage

  tanzu operations cluster extension list [flags]

Flags

      --cluster-name string   scope search to the specified cluster name
  -t, --cluster-type string   type of the cluster (eks/attached)
      --max-size uint         number of records to return
      --name string           scope search to the specified name
      --offset uint           offset at which to start returning records
  -o, --output string         output format (yaml|json)

get

Get details from a cluster

Usage

  tanzu operations cluster get CLUSTER_NAME [flags]

Flags

  -t, --cluster-type string   type of the cluster (eks/attached)
  -o, --output string         Output format (yaml | json) (default "yaml")

Example

$ tanzu operations cluster get cluster1 --cluster-type attached
fullName:
  managementClusterName: attached
  name: cluster1
  orgId: <id>
  provisionerName: attached
meta:
  annotations:
    authoritativeRID: rid:c:<id>:attached:attached:cluster1
  creationtime: "<timestamp>"
  description: Attaching cluster using Tanzu CLI
  labels:
    tmc.cloud.vmware.com/creator: samlee
  parentReferences:
  - rid: rid:cg:<id>:default
    uid: cg:<id>
  - rid: rid:prvn:<id>:attached:attached
    uid: prvn:<id>
  resourceVersion: "471"

kubeconfig

Service fetches kubeconfig for clusters

Usage

  tanzu operations cluster kubeconfig [command]

Commands

  get         Get cluster kubeconfig.

kubeconfig get

Get cluster kubeconfig.

Usage

  tanzu operations cluster kubeconfig get CLUSTER_AGENT_NAME [flags]

Flags

  -t, --cluster-type string   type of the cluster (eks/attached) (default "eks")
  -n, --namespace string      get kubeconfig for specific namespace

list

List clusters

Usage

  tanzu operations cluster list [flags]

Flags

  -t, --cluster-type string   type of the cluster (eks/attached)
      --max-size uint         number of records to return
      --name string           scope search to the specified name
      --offset uint           offset at which to start returning records
  -o, --output string         output format (yaml|json)
  -q, --query string          tql to query the stores

Example

$ tanzu operations cluster list
  name                  MANAGEMENTCLUSTER   PROVISIONER LABELS
  cluster1              attached            attached    tmc.cloud.vmware.com/creator:samlee
  cluster2              eks                 eks         tmc.cloud.vmware.com/creator:samlee
  cluster1              eks                 eks         tmc.cloud.vmware.com/creator:samlee

logs

Archive the logs of Tanzu Mission Control components present in the cluster

Usage

  tanzu operations cluster logs [flags]

Flags

  -k, --kubeconfig string   the kubeconfig file of the cluster managed by Tanzu Mission Control
  -o, --output string       the output directory to save logs (default temp directory)

managed-resources

Managed Kubernetes resources

Usage

  tanzu operations cluster managed-resources [command]

Commands

  list        lists all the tmc managed resources
  retain      retain tmc managed resources

managed-resources list

List all the TMC-managed resources

Usage

  tanzu operations cluster managed-resources list [flags]

Flags

  -k, --kubeconfig string   config file of cluster monitored via TMC

managed-resources retain

Retain TMC-managed resources

Usage

  tanzu operations cluster managed-resources retain [command]

Flags

  -k, --kubeconfig string   config file of cluster monitored via TMC
  -n, --namespace string    namespace of the resource to be retained

reattach

Reattach an existing cluster

Usage

  tanzu operations cluster reattach CLUSTER_NAME [flags]

Flags

  -t, --cluster-type string     type of the cluster (eks/attached)
      --image-registry string   name of the image registry to be used for the cluster. If set empty, no image registry config will be used. If left unset, existing image registry config will be used. (default "use-default")
  -k, --kubeconfig string       the kubeconfig file of the actual cluster to use for applying the Tanzu Mission Control resource manifest
      --proxy-name string       name of the proxy config to be used for the cluster. if empty, original proxy config (if any) will be picked
      --skip-verify             skip the post-flight checks that confirms if the cluster re-attach was successful
      --use-proxy               use proxy config for the cluster

template

Policy CLI template

Usage

  tanzu operations cluster template [command]

Commands

  get         Get CLI template for policy
  list        List CLI templates for policy (filter using policy-type)

template get

Get CLI template for policy

Usage

  tanzu operations cluster template get TEMPLATE_NAME [flags]

Flags

  -t, --policy-type string   policy type as custom-policy|image-policy|namespace-quota-policy|network-policy|security-policy

template list

List CLI templates for policy (filter using policy-type)

Usage

  tanzu operations cluster template list [flags]

Flags

  -t, --policy-type string   policy type as custom-policy|image-policy|namespace-quota-policy|network-policy|security-policy

update

Update (overwrite) a cluster

Usage

  tanzu operations cluster update [flags]

Flags

  -f, --file string   resource file from which to update the cluster

validate

Prints report of components present in the cluster

Usage

  tanzu operations cluster validate [flags]

Flags

  -k, --kubeconfig string   config file of cluster monitored via TMC
check-circle-line exclamation-circle-line close-line
Scroll to top icon