tanzu services

Work with service instances, classes and claims in Services Toolkit in Tanzu Application Platform (commonly known as TAP). For more information, see the TAP documentation.

The application operators and application developers roles in TAP use the Services CLI to create claims. For more information about roles see User roles in the TAP documentation.

Installation

To access this command group, you must install the Tanzu CLI by following the instructions in Install the Tanzu CLI in the Tanzu Application Platform documentation.

Usage

CLI plugin: services | Target: kubernetes | Primarily used for: App development | Release Notes

  tanzu services [command]
  tanzu kubernetes services [command]

Aliases

  services, service

Commands

  claimable       Search for resources that can be claimed
  class-claim     Commands for working with class claims
  classes         Commands for working with classes
  resource-claims Commands for working with resource claims

Flags

      --context string      name of the kubeconfig context to use (default is current-context defined by kubeconfig)
  -h, --help                help for services
      --kubeconfig string   kubeconfig file (default is ~/.kube/config)
      --no-color            turn off color output in terminals

tanzu services claimable

Searches for resources that are available to claim.

Usage

  tanzu services claimable [command]
  tanzu kubernetes services claimable [command]

Aliases

  claimable, claimables

Commands

  list        List claimable resources for a given class (up to a maximum of 50)

Flags

  -h, --help   help for claimable

tanzu services claimable list

This command lists resources for a class that you can claim directly using the tanzu service resource-claim create command.

Usage

  tanzu services claimable list [flags]
  tanzu kubernetes services claimable list [flags]

Examples

  tanzu service claimable list --class postgres
  tanzu service claimable list --class postgres --namespace app-ns-1

Flags

      --class string     name of the class to list claimable resources for
  -h, --help             help for list
  -n, --namespace name   kubernetes namespace (defaulted from kube config)

tanzu services class-claim

Class claims allow you to create claims by only referring to a class.

Class claims are an alternative approach to resource claims, which require you to refer to a specific resource by name, namespace, kind and API group/version.

VMware recommends that you work with class claims wherever possible because they are easier to create and are considered more portable across multiple clusters.

Usage

  tanzu services class-claim [command]
  tanzu kubernetes services class-claim [command]

Aliases

  class-claim, class-claims, cc, ccs

Commands

  create      Create a class claim
  delete      Delete a class claim
  get         Get a class claim
  list        List class claims

Flags

  -h, --help   help for class-claim

tanzu services class-claim create

This command creates a claim by referring to a class.

You can bind claims for service instances to application workloads.

Claims are mutually exclusive, meaning that after a service instance has been claimed, no other claim can claim it. This prevents unauthorized application workloads from accessing a service instance that your application workloads are using.

You can pass parameters with the --parameter key.subKey=value flag. You can provide this flag multiple times. The value must be valid YAML. You can find available parameters for a class by running tanzu service class get CLASS-NAME.

Usage

  tanzu services class-claim create [name] [flags]
  tanzu kubernetes services class-claim create [name] [flags]

Examples

  tanzu service class-claim create psql-claim-1 --class postgresql-unmanaged
  tanzu services class-claim create rmq-claim-1 --class rabbitmq-unmanaged --parameter storageGB=2 --parameter replicas=3

Flags

      --class string            the name of a class to claim an instance of
  -h, --help                    help for create
  -n, --namespace name          kubernetes namespace (defaulted from kube config)
  -p, --parameter stringArray   claim parameters

tanzu services class-claim delete

This command deletes a class claim.

You will be prompted to confirm the deletion unless you pass the --yes flag. Before you delete a claim, you must be aware of the consequences of doing so.

When you create a claim, it signals a that you want a service instance. You usually create a service instance to bind it to one or more application workload. If you delete a claim, it signals that you no longer need the claimed service instance. At this point, other claims created by other users can claim the service instance you previously claimed.

Usage

  tanzu services class-claim delete [flags]
  tanzu kubernetes services class-claim delete [flags]

Examples

  tanzu service class-claim delete psql-claim-1
  tanzu service class-claim delete psql-claim-1 --yes
  tanzu service class-claim delete psql-claim-1 --namespace app-ns-1

Flags

  -h, --help             help for delete
  -n, --namespace name   kubernetes namespace (defaulted from kube config)
  -y, --yes              skip the confirmation of the deletion

tanzu services class-claim get

This command gets detailed information for a class claim.

The output includes the name of the class the claim was created for and the claim ref. Pass claim refs to the --service-ref flag of the tanzu apps workload create command to bind workloads to claimed service instances.

Usage

  tanzu services class-claim get [flags]
  tanzu kubernetes services class-claim get [flags]

Examples

  tanzu service class-claim get psql-claim-1
  tanzu service class-claim get psql-claim-1 --namespace app-ns-1

Flags

  -h, --help             help for get
  -n, --namespace name   kubernetes namespace (defaulted from kube config)

tanzu services class-claim list

This command lists class claims in a namespace or across all namespaces.

If you run this command with the -o wide flag, claim refs for each of the claims are printed. Pass claim refs to the --service-ref flag of the tanzu apps workload create command to bind workloads to claimed service instances.

Usage

  tanzu services class-claim list [flags]
  tanzu kubernetes services class-claim list [flags]

Examples

  tanzu service class-claim list
  tanzu service class-claim list --class postgres
  tanzu service class-claim list -o wide
  tanzu service class-claim list -n app-ns-1 -o wide

Flags

  -A, --all-namespaces   list class claims across all namespaces
  -c, --class string     list class claims referencing this class
  -h, --help             help for list
  -n, --namespace name   kubernetes namespace (defaulted from kube config)
  -o, --output string    output format (currently the only available option is 'wide')

tanzu services classes

Classes (sometimes referred to as “instance classes” or “service instance classes”) are a means to discover and describe groupings of similar service instances. In that regard they can be considered analogous to the concept of storage classes in Kubernetes.

By listing the available classes on a cluster (see ‘tanzu service class list -h’), you can discover the range of services on offer.

You can create a claim for a service instance of a particular class using the ‘tanzu service class-claim create’ command.

Getting a class allows you to see more detailed information about the class, including, where available, a list of parameters which can be passed via the ‘–parameter’ flag to the ‘tanzu service class-claim create’ command.

Usage

  tanzu service classes [command]
  tanzu kubernetes service classes [command]

Aliases

  classes, class

Commands

  get         Get a class
  list        List the available classes

Flags

  -h, --help   help for classes

tanzu services classes get

This command gets detailed information for a class.

The output includes more detailed information about the class, including, where available, a list of parameters that you can pass to the tanzu service class-claim create command using the --parameter flag.

Usage

  tanzu services classes get [name] [flags]
  tanzu kubernetes services classes get [name] [flags]

Examples

  tanzu service class get rmq-small

Flags

  -h, --help   help for get

tanzu services classes list

This command lists the available classes.

Usage

  tanzu services classes list [flags]
  tanzu kubernetes services classes list [flags]

Examples

  tanzu service class list

Flags

  -h, --help   help for list

tanzu services resource-claims

Resource claims enable you to create claims by referring to a specific resource by name, namespace, kind, and API group or version.

Resource claims are an alternative approach to class claims, which only require you to refer to a class.

VMware recommends that you work with class claims wherever possible because they are easier to create and are more portable across multiple clusters.

Usage

  tanzu services resource-claims [command]
  tanzu kubernetes services resource-claims [command]

Aliases

  resource-claims, resource-claim, rc, rcs

Commands

  create      Create a resource claim
  delete      Delete a resource claim
  get         Get a resource claim
  list        List resource claims

Flags

  -h, --help   help for resource-claims

tanzu services resource-claim create

This command creates a claim for a specific resource.

It is common to create claims for resources that you can bind to application workloads using the claim.

This approach to creating claims differs to that of class claims, in which the system ultimately finds and supplies a claimable resource for you. You only have to work with resource claims if you want full control over which resource is claimed. If not, it is simpler and more convenient to work with class claims. See tanzu service class-claim --help.

Claims are mutually exclusive, meaning that after a service instance has been claimed, no other claim can claim it. This prevents unauthorized application workloads from accessing a resource that your application workloads are using.

To find resources you can create resource claims for, run the tanzu service claimable list command.

Usage

  tanzu services resource-claim create [name] [flags]
  tanzu kubernetes services resource-claim create [name] [flags]

Examples

  tanzu service resource-claim create psql-claim-1 --resource-name psql-instance-1 --resource-kind Postgres --resource-api-version sql.example.com/v1
  tanzu service resource-claim create psql-claim-1 --resource-name psql-instance-1 --resource-kind Postgres --resource-api-version sql.example.com/v1 --resource-namespace service-instances-1
  tanzu service resource-claim create psql-claim-1 --resource-name secret-1 --resource-kind Secret --resource-api-version v1

Flags

  -h, --help                          help for create
  -n, --namespace name                kubernetes namespace (defaulted from kube config)
      --resource-api-version string   API group and version of the resource to claim (in the form '<GROUP>/<VERSION>')
      --resource-kind string          kind of the resource to claim
      --resource-name string          name of the resource to claim
      --resource-namespace string     namespace of the resource to claim

tanzu services resource-claim delete

This command deletes a resource claim.

You will be prompted to confirm the deletion unless you pass the --yes flag. Before you delete a claim, you must be aware of the consequences of doing so.

When you create a claim, it signals a that you want a resource. You usually create a resource to bind it to one or more application workload. If you delete a claim, it signals that you no longer need the claimed resource. At this point, other claims created by other users can claim the resource you previously claimed.

Usage

  tanzu services resource-claim delete [name] [flags]
  tanzu kubernetes services resource-claim delete [name] [flags]

Examples

  tanzu service resource-claim delete psql-claim-1
  tanzu service resource-claim delete psql-claim-1 --yes
  tanzu service resource-claim delete psql-claim-1 --namespace app-ns-1

Flags

  -h, --help             help for delete
  -n, --namespace name   kubernetes namespace (defaulted from kube config)
  -y, --yes              skip the confirmation of the deletion

tanzu services resource-claim get

This command gets detailed information for a resource claim.

The output includes the name of claimed resource and the claim ref. Pass claim refs to the --service-ref flag of the tanzu apps workload create command to bind workloads to claimed service instances.

Usage

  tanzu services resource-claim get [name] [flags]
  tanzu kubernetes services resource-claim get [name] [flags]

Examples

  tanzu service resource-claim get psql-claim-1
  tanzu service resource-claim get psql-claim-1 --namespace app-ns-1

Flags

  -h, --help             help for get
  -n, --namespace name   kubernetes namespace (defaulted from kube config)

tanzu services resource-claim list

This command lists resource claims in a namespace or across all namespaces.

If you run this command with the -o wide flag, claim refs for each of the claims are printed. Pass claim refs to the --service-ref flag of the tanzu apps workload create command to bind workloads to claimed service instances.

Usage

  tanzu services resource-claim list [flags]
  tanzu kubernetes services resource-claim list [flags]

Examples

  tanzu service resource-claim list
  tanzu service resource-claim list -o wide
  tanzu service resource-claim list -n app-ns-1 -o wide

Flags

  -A, --all-namespaces   list resource claims across all namespaces
  -h, --help             help for list
  -n, --namespace name   kubernetes namespace (defaulted from kube config)
  -o, --output string    output format (currently the only available option is 'wide')
check-circle-line exclamation-circle-line close-line
Scroll to top icon