Service Mesh 101: Get Service Mesh-Certified   Enroll  »


This is not the latest version of Linkerd!
This documentation is for an older version of Linkerd. You may want the Linkerd 2.16 (current) documentation instead.

multicluster

Manages the multicluster setup for Linkerd.

This command provides subcommands to manage the multicluster support functionality of Linkerd. You can use it to install the service mirror components on a cluster, manage credentials and link clusters together.

Examples

# Install multicluster addons.
linkerd --context=cluster-a multicluster install | kubectl --context=cluster-a apply -f -

# Extract mirroring cluster credentials from cluster A and install them on cluster B
linkerd --context=cluster-a multicluster link --cluster-name=target | kubectl apply --context=cluster-b -f -

Subcommands

allow

Outputs credential resources that allow service-mirror controllers to connect to this cluster

Flags

Flag Usage
--ignore-cluster Ignore cluster configuration
--namespace The destination namespace for the service account.
--service-account-name The name of the multicluster access service account

check

Check the multicluster extension for potential problems.

The check command will perform a series of checks to validate that the multicluster extension is configured correctly. If the command encounters a failure it will print additional information about the failure and exit with a non-zero exit code.

Examples

# Check that the multicluster extension is configured correctly
linkerd multicluster check

Flags

Flag Usage
--namespace
-n
--output
-o
Output format. One of: basic, json
--proxy
--wait Maximum allowed time for all tests to pass

gateways

Display stats information about the gateways in target clusters

Flags

Flag Usage
--cluster-name the name of the target cluster
--gateway-namespace the namespace in which the gateway resides on the target cluster
--time-window
-t
Time window (for example: “15s”, “1m”, “10m”, “1h”). Needs to be at least 15s.

install

Output Kubernetes configs to install the Linkerd multicluster add-on

Examples

# Default install.
linkerd multicluster install | kubectl apply -f -

The installation can be configured by using the --set, --values, --set-string and --set-file flags.
A full list of configurable values can be found at https://github.com/linkerd/linkerd2/blob/main/multicluster/charts/linkerd-multicluster/README.md

Flags

Flag Usage
--gateway If the gateway component should be installed
--gateway-port The port on the gateway used for all incoming traffic
--gateway-probe-port The liveness check port of the gateway
--gateway-probe-seconds The interval at which the gateway will be checked for being alive in seconds
--gateway-service-type Overwrite Service type for gateway service
--namespace The namespace in which the multicluster add-on is to be installed. Must not be the control plane namespace.
--service-mirror-credentials Whether to install the service account which can be used by service mirror components in source clusters to discover exported services
--set set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--set-file set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--set-string set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--values
-f
specify values in a YAML file or a URL (can specify multiple)
--wait Wait for core control-plane components to be available

Outputs resources that allow another cluster to mirror services from this one

Examples

# To link the west cluster to east
linkerd --context=east multicluster link --cluster-name east | kubectl --context=west apply -f -

The command can be configured by using the --set, --values, --set-string and --set-file flags.
A full list of configurable values can be found at https://github.com/linkerd/linkerd2/blob/main/multicluster/charts/linkerd-multicluster-link/README.md

Flags

Flag Usage
--api-server-address The api server address of the target cluster
--cluster-name Cluster name
--control-plane-version (Development) Tag to be used for the service mirror controller image
--gateway-addresses If specified, overwrites gateway addresses when gateway service is not type LoadBalancer (comma separated list)
--gateway-name The name of the gateway service
--gateway-namespace The namespace of the gateway service
--gateway-port If specified, overwrites gateway port when gateway service is not type LoadBalancer
--log-level Log level for the Multicluster components
--namespace The namespace for the service account
--registry Docker registry to pull service mirror controller image from ($LINKERD_DOCKER_REGISTRY)
--selector
-l
Selector (label query) to filter which services in the target cluster to mirror
--service-account-name The name of the service account associated with the credentials
--service-mirror-retry-limit The number of times a failed update from the target cluster is allowed to be retried
--set set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--set-file set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--set-string set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--values
-f
specify values in a YAML file or a URL (can specify multiple)

uninstall

Output Kubernetes configs to uninstall the Linkerd multicluster add-on

Outputs link resources for deletion

Flags

Flag Usage
--cluster-name Cluster name
--namespace The namespace for the service account