-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
website: Add deployment operator concept (#508)
Add deployment operator document. Signed-off-by: Kfir Toledo <[email protected]>
- Loading branch information
1 parent
42cb30c
commit 843e040
Showing
5 changed files
with
119 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Core Concepts | ||
description: Core Concepts and Tasks | ||
description: Core Concepts of the ClusterLink system. | ||
weight: 30 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Tasks | ||
description: How to do single specific targeted activities with ClusterLink. | ||
weight: 35 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
title: Deployment Operator | ||
description: Usage and configuration of the ClusterLink deployment operator. | ||
weight: 50 | ||
--- | ||
The ClusterLink deployment operator allows easy deployment of ClusterLink to a K8s cluster. | ||
The preferred deployment approach involves utilizing the ClusterLink CLI, | ||
which automatically deploys both the ClusterLink operator and ClusterLink components. | ||
However, it's important to note that ClusterLink deployment necessitates peer certificates for proper functioning. | ||
Detailed instructions for creating these peer certificates can be found in the [getting started]({{< ref "users#Setup">}}). | ||
|
||
## The common use-case | ||
|
||
The common use case for deploying ClusterLink on a cloud based K8s cluster (i.e., EKS, GKE, IKS, etc.) is using the CLI command: | ||
|
||
```sh | ||
clusterlink deploy peer --autostart --name <peer_name> --fabric <fabric_name> | ||
``` | ||
|
||
The command assumes that `kubectl` is configured to access the correct peer (K8s cluster) | ||
and that certificates files are placed in the current working directory. | ||
If they are not, use the flag `--path <path>` to reference the directory where certificate files are stored. | ||
The command deploys the ClusterLink operator in the `clusterlink-operator` namespace and converts | ||
the peer certificates to secrets in the `clusterlink-system` namespace, where ClusterLink components will be installed. | ||
By default, these components are deployed in the `clusterlink-system` namespace. | ||
The `--autostart` option will create a ClusterLink K8s custom resource object and deploy it to the operator. | ||
The operator will then create the ClusterLink components in the `clusterlink-system` namespace and enable ClusterLink in the cluster. | ||
Additionally, a `LoadBalancer` service is created to allow cross-cluster connectivity using ClusterLink. | ||
|
||
## Deployment for Kind environment | ||
|
||
To deploy ClusterLink in a local environment like Kind, you can use the following command: | ||
|
||
```sh | ||
clusterlink deploy peer --autostart --name <peer_name> --fabric <fabric_name> --ingress=NodePort --ingress-port=30443 | ||
``` | ||
|
||
The Kind environment doesn't allocate an external IP to the `LoadBalancer` service by default. | ||
In this case, we will use a `NodePort` service to establish multi-cluster connectivity using ClusterLink. | ||
Alternatively, you can install MetalLB to add a Load Balancer implementation to the Kind cluster. See instructions | ||
[here](https://kind.sigs.k8s.io/docs/user/loadbalancer/). | ||
The port flag is optional, and by default, ClusterLink will use any allocated NodePort that the Kind cluster provides. | ||
However, it is more convenient to use a fixed setting NodePort for peer configuration, as demonstrated in the [ClusterLink Tutorials]({{< ref "tutorials">}}). | ||
|
||
|
||
## Deployment of specific version | ||
|
||
To deploy a specific ClusterLink image version use the `tag` flag: | ||
|
||
```sh | ||
clusterlink deploy peer --autostart --name <peer_name> --fabric <fabric_name> --tag <version_tag> | ||
``` | ||
|
||
The `tag` flag will change the tag version in the ClusterLink K8s custom resource object that will be deployed to the operator. | ||
|
||
## Deployment using manually defined ClusterLink custom resource | ||
|
||
The deployment process can be split into two steps: | ||
|
||
1. Deploy only ClusterLink operator: | ||
|
||
```sh | ||
clusterlink deploy peer ---name <peer_name> --fabric <fabric_name> | ||
``` | ||
|
||
This command will deploy only the ClusterLink operator and the certificate's secrets as described in the [common use case]({{< ref "operator#the-common-use-case" >}}). | ||
1. {{< anchor deploy-cr-instance >}} Deploy a ClusterLink K8s custom resource object: | ||
```yaml | ||
kubectl apply -f - <<EOF | ||
apiVersion: clusterlink.net/v1alpha1 | ||
kind: ClusterLink | ||
metadata: | ||
namespace: clusterlink-operator | ||
name: <peer_name> | ||
spec: | ||
ingress: | ||
type: <ingress_type> | ||
dataplane: | ||
type: envoy | ||
replicas: 1 | ||
logLevel: info | ||
namespace: clusterlink-system | ||
EOF | ||
``` | ||
## Additional deployment configurations | ||
The `deploy peer` command has the following flags: | ||
- **namespace:** This field determines the namespace where the ClusterLink components are deployed. | ||
By default, it uses `clusterlink-system`, which is created by the `clusterlink deploy peer` command. | ||
If a different namespace is desired, that namespace must already exist. | ||
- **dataplane:** This field determines the type of ClusterLink dataplane, with supported values `go` or `envoy`. By default, it uses `envoy`. | ||
- **dataplane-replicas:** This field determines the number of ClusterLink dataplane replicas. By default, it uses 1. | ||
- **ingress:** This field determines the type of ingress service to expose ClusterLink deployment, | ||
with supported values: `LoadBalancer`, `NodePort`, or `None`. By default, it uses `LoadBalancer`. | ||
- **ingress-port:** This field determines the port number of the external service. | ||
By default, it uses port `443` for the `LoadBalancer` ingress type. | ||
For the `NodePort` ingress type, the port number will be allocated by Kubernetes. | ||
In case the user changes the default value, it is the user's responsibility to ensure the port number is valid and available for use. | ||
- **log-level:** This field determines the severity log level for all the components (controlplane and dataplane). | ||
By default, it uses `info` log level. | ||
- **container-registry:** This field determines the container registry to pull the project images. | ||
By default, it uses `ghcr.io/clusterlink-net`. | ||
- **tag:** This field determines the version of project images to pull. By default, it uses the `latest` version. | ||
|
||
All the flags are mapped to corresponding field in the ClusterLink custom resource. |