You are viewing docs for an older version of Linkerd. View the latest docs.
  • GitHub
  • Slack
  • Linkerd Forum

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 -

Flags

FlagUsage
--api-addrOverride kubeconfig and communicate directly with the control plane at host:port (mostly for testing)
--asUsername to impersonate for Kubernetes operations
--as-groupGroup to impersonate for Kubernetes operations
--contextName of the kubeconfig context to use
--kubeconfigPath to the kubeconfig file to use for CLI requests
--linkerd-namespace
-L
Namespace in which Linkerd is installed
--verboseTurn on debug logging

Subcommands

allow

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

Flags

FlagUsage
--ignore-clusterIgnore cluster configuration
--namespaceThe destination namespace for the service account.
--service-account-nameThe 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

FlagUsage
--namespace
-n
--output
-o
Output format. One of: basic, json
--proxy
--waitMaximum allowed time for all tests to pass

gateways

Display stats information about the gateways in target clusters

Flags

FlagUsage
--cluster-namethe name of the target cluster
--wait
-w
time allowed to fetch diagnostics

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

FlagUsage
--gatewayIf the gateway component should be installed
--gateway-portThe port on the gateway used for all incoming traffic
--gateway-probe-portThe liveness check port of the gateway
--gateway-probe-secondsThe interval at which the gateway will be checked for being alive in seconds
--gateway-service-typeOverwrite Service type for gateway service
--haInstall multicluster extension in High Availability mode.
--ignore-clusterIgnore the current Kubernetes cluster when checking for existing cluster configuration (default false)
--service-mirror-credentialsWhether to install the service account which can be used by service mirror components in source clusters to discover exported services
--setset values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--set-fileset values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--set-stringset 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)
--waitWait for core control-plane components to be available

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

Note that the Link resource applies only in one direction. In order for two clusters to mirror each other, a Link resource will have to be generated for each cluster and applied to the other.

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

FlagUsage
--api-server-addressThe api server address of the target cluster
--cluster-nameCluster name
--control-plane-version(Development) Tag to be used for the service mirror controller image
--gateway-addressesIf specified, overwrites gateway addresses when gateway service is not type LoadBalancer (comma separated list)
--gateway-nameThe name of the gateway service
--gateway-namespaceThe namespace of the gateway service
--gateway-portIf specified, overwrites gateway port when gateway service is not type LoadBalancer
--log-levelLog level for the Multicluster components
--namespaceThe namespace for the service account
--registryDocker 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-nameThe name of the service account associated with the credentials
--service-mirror-retry-limitThe number of times a failed update from the target cluster is allowed to be retried
--setset values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
--set-fileset values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
--set-stringset 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

FlagUsage
--cluster-nameCluster name
--namespaceThe namespace for the service account