tanzu service-mesh

Applies changes to the configuration in your Tanzu Service Mesh tenant by applying declarative configuration files. For example, you can use the tanzu service-mesh command group to create objects, such as global namespaces, and policies, such as access control policies, for your tenant.

Usage

CLI plugin: service-mesh | Target: global | Release Notes

Syntax:

tanzu service-mesh [COMMAND]

Aliases

service-mesh and sm

Global Flags

-h, --help

Help text.

tanzu service-mesh apply

Applies a declarative configuration from a YAML file to your Tanzu Service Mesh tenant. For more information, see Apply a Configuration to Tanzu Service Mesh SaaS Using the CLI.

Usage

tanzu service-mesh apply [FLAGS]

Example

To apply a global namespace configuration YAML file:

tanzu service-mesh apply -f my-sample-gns-manifest.yaml

Flags

--debug

Activates logging.

-f, --file string

The YAML file from which to apply the configuration.

-h, --help

Help text.

tanzu service-mesh config

Sets preferences for the Tanzu Service CLI plugin.

Commands:

tanzu service-mesh config set

Sets configuration properties for the Tanzu Service Mesh CLI plugin.

Usage

tanzu service-mesh config set [FLAGS]

Flags

--debug-always

Always prints logging output even if the --debug flag is not included.

-h, --help

Help text.

--debug

Activates logging.

tanzu service-mesh config view

Shows current configuration properties.

Usage

tanzu service-mesh config view [FLAGS]

Flags

-h, --help

Help text.

--debug

Activates logging.

tanzu service-mesh delete

Removes a cluster or an object (for example, a global namespace) from your Tanzu Service Mesh tenant by deleting the manifest file that contains the configuration of the cluster or object. For more information, see Remove a Cluster from Tanzu Service Mesh Using the CLI and Delete an Object or a Policy from Tanzu Service Mesh SaaS Using the CLI.

Usage

tanzu service-mesh delete [FLAGS]

Example

To remove a global namespace from Tanzu Service Mesh:

tanzu service-mesh delete -f my-sample-gns-config.yaml

Flags

--debug

Activates logging.

-f, --file string

The YAML file to delete.

-h, --help

Help text.

tanzu service-mesh get

Performs the following operations:

  • Gets a declarative object configuration from a YAML file. For example, you can get the configuration of an access control policy from a YAML file, replace the values in the configuration with your values, and then create another access control policy by applying the YAML file.

  • Gets the configuration of an existing object from the Tanzu Service Mesh server that you are logged in. For example, you can get the configuration of an existing public service, copy the configuration into a new YAML file, replace the existing values with your values, and then create another public service based on the configuration. The command must include the long or short name of an appropriate API specification. For more information, see Use an Existing Object or Policy Configuration to Create a Manifest.

Tip To get a list of the short and long names of the available API specifications, run tanzu service-mesh get -h. In the output, the list of available APIs shows the long name of each specification first, followed by the short name in parentheses.

  • Gets a list of the names of objects or policies of a specified type from the Tanzu Service Mesh server. For example, you can get a list of the names of global namespaces or access control policies. The command must include the long or short name of an appropriate API specification.

Usage

tanzu service-mesh get [FLAGS]
tanzu service-mesh get [COMMAND]
tanzu service-mesh get [SHORT API SPEC NAME | LONG API SPEC NAME]

Commands:

Flags

--debug

Activates logging.

-f, --file string

Specifies the YAML file to get the declarative configuration from.

-h, --help

Help text. If the --help flag is specified, the tanzu service-mesh get command shows a list of the long and short names of the available API specifications.

-l, --labels string

The --labels flag specifies the name of a global namespace and is required to get the configuration of objects and policies that are associated with and contained in a global namespace, such as public services, external services, and access control policies. See an example of the command with the --labels flag in Examples.

Examples

To get the declarative configuration of an access control policy called sample-acp from a YAML file:

tanzu service-mesh get -f sample-acp-config.yaml

To get the configuration of an existing global namespace called sample-gns from Tanzu Service Mesh:

tanzu service-mesh get globalnamespaces sample-gns

To get the configuration of an existing external service called sample-external-service from Tanzu Service Mesh:

tanzu sm get externalservice sample-external-service --labels gnsId=sample-gns
Note

: In this example, the tanzu sm get command includes the --labels flag to specify the name of the global namespace that contains the external service.

To get a list of the names of access control policies from the Tanzu Service Mesh server:

tanzu sm get accesscontrolpolicies

tanzu service-mesh get spec

Gets an API specification for an object or a policy in YAML format from the Tanzu Service Mesh server that you are logged in. You can create a declarative object configuration YAML file based on a returned API specification and then create an object in Tanzu Service Mesh by applying the configuration file. For example, you can get an API specification for a global namespace, create a global namespace configuration file based on the API specification, and then create a global namespace by applying the configuration file. For more information, see Create a Declarative Manifest Based on a Tanzu Service Mesh API Specification.

Usage

tanzu service-mesh get spec [SHORT API SPEC NAME | LONG API SPEC NAME] [FLAGS]

SHORT API SPEC NAME and LONG API SPEC NAME are the short name and long name of an API specification respectively.

Tip To get a list of the short and long names of the available API specifications, run tanzu service-mesh get spec -h. In the output, the list of available APIs shows the long name of each specification first, followed by the short name in parentheses.

Examples

To get the API specification for a global namespace:

tsm get spec globalnamespaces.gns.tsm.vmware.com

To get the API specification for a public service:

tanzu sm get spec publicservices
Note

The first example uses a short API name, and the second example uses a long API name.

Flags

-h, --help

Help text.

--debug

Activates logging.

tanzu service-mesh login

Logs you in to a Tanzu Service Mesh SaaS server (endpoint). You must log in to be able to use the Tanzu Service Mesh CLI plugin. For more information, see Log in to the Tanzu Service Mesh CLI.

Usage

tanzu service-mesh login [FLAGS]

Example

To log in to a Tanzu Service Mesh SaaS server, for example, my-tsm-saas.servicemesh.biz:

tanzu service-mesh login -s my-tsm-saas.servicemesh.biz -t zw5n_JW20NLd1oqOcRS4WfaxlW67LoXkyYi0VlAqRxKatjI2uBBiLE0oGu1DoIe6

Flags

--debug

Activates extra logging.

-h, --help

Help text.

-k, --in-secure

This flag is reserved for internal use. Don’t use it.

-p, --private-saas

This flag is reserved for internal use. Don’t use it.

-s, --server

The fully qualified name (FQDN) of the Tanzu Service Mesh SaaS server to log in to.

-t, --token

The Tanzu Service Mesh API token to authenticate with the Tanzu Service Mesh SaaS server.

check-circle-line exclamation-circle-line close-line
Scroll to top icon