본문 바로가기
WIKI 기술 지식 베이스

multicluster

원문 보기 위키 갱신

Linkerd의 멀티클러스터 설정을 관리해요.

이 명령은 Linkerd의 멀티클러스터 지원 기능을 관리하는 하위 명령들을 제공해요. 클러스터에 서비스 미러 컴포넌트를 설치하고, 자격 증명을 관리하며, 클러스터를 서로 연결(link)하는 데 사용할 수 있어요.

예시 (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)

Flag Usage
Flag Usage
--api-addr Override kubeconfig and communicate directly with the control plane at host:port (mostly for testing)
--as Username to impersonate for Kubernetes operations
--as-group Group to impersonate for Kubernetes operations
--context Name of the kubeconfig context to use
--kubeconfig Path to the kubeconfig file to use for CLI requests
--linkerd-namespace-L Namespace in which Linkerd is installed
--verbose Turn on debug logging

출처: Linkerd multicluster

본문

하위 명령 (Subcommands)

Subcommand Description
Subcommand Description
allow Outputs credential resources that allow service-mirror controllers to connect to this cluster
check Check the multicluster extension for potential problems
gateways Display stats information about the gateways in target clusters
install Output Kubernetes configs to install the Linkerd multicluster add-on
link-gen Outputs a Link manifest and credentials for another cluster to mirror services from this one
uninstall Output Kubernetes configs to uninstall the Linkerd multicluster add-on

allow

서비스 미러 컨트롤러가 이 클러스터에 연결할 수 있게 해주는 자격 증명 리소스를 출력해요.

플래그 (Flags)

Flag Usage
Flag Usage
--ignore-cluster Ignore cluster configuration
--namespace The destination namespace for the service account.
--output-o Output format. One of: json|yaml
--service-account-name The name of the multicluster access service account

check

멀티클러스터 확장의 잠재적인 문제를 확인해요.

check 명령은 멀티클러스터 확장이 올바르게 구성됐는지 검증하기 위해 일련의 검사를 수행해요. 명령이 실패를 만나면 실패에 대한 추가 정보를 출력하고 0이 아닌 종료 코드로 종료해요.

예시 (Examples)

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

플래그 (Flags)

Flag Usage
Flag Usage
--namespace-n
--output-o Output format. One of: table, json, short
--proxy
--timeout Timeout for calls to the Kubernetes API
--wait Maximum allowed time for all tests to pass

gateways

대상 클러스터의 게이트웨이에 대한 통계 정보를 표시해요.

플래그 (Flags)

Flag Usage
Flag Usage
--cluster-name the name of the target cluster
--output-o used to print output in different format
--wait-w time allowed to fetch diagnostics

install

Linkerd 멀티클러스터 애드온(add-on)을 설치하기 위한 Kubernetes 구성을 출력해요.

예시 (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/values.yaml
`

플래그 (Flags)

Flag Usage
Flag Usage
--gateway If the gateway component should be installed
--gateway-healthcheck-nodeport Set the healthCheckNodePort on the gateway service (only used when externalTrafficPolicy is Local)
--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
--ha Install multicluster extension in High Availability mode.
--ignore-cluster Ignore the current Kubernetes cluster when checking for existing cluster configuration (default false)
--output-o Output format. One of: json|yaml
--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

다른 클러스터가 이 클러스터에서 서비스를 미러링할 수 있는 Link 매니페스트와 자격 증명을 출력해요.

Link 리소스는 한 방향으로만 적용된다는 점에 주의하세요. 두 클러스터가 서로를 미러링하려면 각 클러스터에 대해 Link 리소스를 생성하고 다른 클러스터에 적용해야 해요.

예시 (Examples)

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

플래그 (Flags)

Flag Usage
Flag Usage
--api-server-address The api server address of the target cluster
--cluster-name Cluster name
--excluded-annotations Annotations to exclude when mirroring services
--excluded-labels Labels to exclude when mirroring services
--federated-service-selector Selector (label query) for federated service members in the target cluster
--gateway If false, allows a link to be created against a cluster that does not have a gateway service
--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
--namespace The namespace for the service account
--output-o Output format. One of: json|yaml
--remote-discovery-selector Selector (label query) to filter which services in the target cluster to mirror in remote discovery mode
--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

uninstall

Linkerd 멀티클러스터 애드온(add-on)을 제거하기 위한 Kubernetes 구성을 출력해요.

플래그 (Flags)

Flag Usage
Flag Usage
--output-o Output format. One of: json|yaml

더 알아보기 (Learn more)