Linkerd is a dedicated infrastructure layer that helps manage communication between services by automatically encrypting connections, handling retries, and timeouts. Installing the Linkerd add-on ensures load balancing for gRPC traffic as BRIX services scale. It also provides telemetry (success rates, latencies) and more..
Linkerd is essential for enabling scalable service support on the BRIX application side. Without it, scaling BRIX microservices will not function.
For instructions on preparing certificates using openssl for Linkerd and its installation, read the article Install Linkerd.
This article will cover how to:
- Automate certificate preparation using the Cert-manager tool and install Linkerd;
Installing Linkerd involves four steps:
- Prepare certificates for Linkerd.
- Download the Helm chart and configuration file.
- Fill out the configuration file.
- Install the Linkerd chart using Helm in a Kubernetes cluster.
Step 1: Prepare certificates for Linkerd
- Install Cert-manager and create namespaces. Cert-manager will use these to store resources related to the web interceptor:
kubectl create namespace linkerd
kubectl label namespace linkerd linkerd.io/is-control-plane=true config.linkerd.io/admission-webhooks=disabled linkerd.io/control-plane-ns=linkerd
kubectl annotate namespace linkerd linkerd.io/inject=disabled
- Install the step tool to create a key pair for signing each certificate:
wget https://dl.smallstep.com/cli/docs-cli-install/latest/step-cli_amd64.deb
sudo dpkg -i step-cli_amd64.deb
- Generate certificates using step to use them for signing:
- Web interceptor certificates;
# Create CA keys |
- Control Plane certificate.
# Create CA keys |
Step 2: Download the Helm chart and configuration file
To install Linkerd via the internet, retrieve the configuration file values-linkerd.yaml
by executing the following command:
helm repo add elma365 https://charts.elma365.tech
helm repo update
helm show values elma365/linkerd > values-linkerd.yaml
Obtaining the configuration file for installation in an offline environment:
helm repo add elma365 https://charts.elma365.tech
tar -xf linkerd-X.Y.Z.tgz
|
Step 3: Fill out the configuration file
Fill in the configuration file values-linkerd.yaml
for installing Linkerd.
Specify the DNS domain name of the Kubernetes cluster in the parameter linkerd.clusterDomain
. In this example, the domain name is cluster.local
:
## Linkerd settings
linkerd:
## DNS name of the Kubernetes domain
clusterDomain: cluster.local
## adds PodSecurityPolicy resource (deprecated as of k8s v1.21)
enablePSP: false
## disable heartbeat
disableHeartBeat: false
...
To ensure high availability, you may uncomment the parameters in the high availability settings section.
Example of enabling high availability
## linkerd settings
|
To connect to the private
## linkerd settings Where the format is:
|
Step 4: Install the Linkerd chart using Helm in a Kubernetes cluster
Install the Linkerd chart in namespace linkerd
. The namespace will be created during installation if it has not been created earlier. Below is the installation command from the directory where the certificates were created in Step 1. If you are running the command from a different directory, specify the paths to the certificates created in Step 1 (caRoot.crt
, caWebhook.crt
).
For installation via the internet:
helm upgrade --install linkerd elma365/linkerd -f values-linkerd.yaml -n linkerd --create-namespace \
--set-file linkerd.identityTrustAnchorsPEM=caRoot.crt \
--set linkerd.identity.issuer.scheme=kubernetes.io/tls \
--set linkerd.policyValidator.externalSecret=true \
--set-file linkerd.policyValidator.caBundle=caWebhook.crt \
--set linkerd.proxyInjector.externalSecret=true \
--set-file linkerd.proxyInjector.caBundle=caWebhook.crt \
--set linkerd.profileValidator.externalSecret=true \
--set-file linkerd.profileValidator.caBundle=caWebhook.crt
For offline installation without internet access:
helm upgrade --install linkerd ./linkerd -f values-linkerd.yaml -n linkerd --create-namespace \
--set-file linkerd.identityTrustAnchorsPEM=caRoot.crt \
--set linkerd.identity.issuer.scheme=kubernetes.io/tls \
--set linkerd.policyValidator.externalSecret=true \
--set-file linkerd.policyValidator.caBundle=caWebhook.crt \
--set linkerd.proxyInjector.externalSecret=true \
--set-file linkerd.proxyInjector.caBundle=caWebhook.crt \
--set linkerd.profileValidator.externalSecret=true \
--set-file linkerd.profileValidator.caBundle=caWebhook.crt
Начало внимание
Installing the Linkerd add-on component does not automatically enable service scaling on the BRIX application side. After installation, modify the ELMA365 application settings and configure autoscaling on the BRIX application side. For more details, read the article Enable service autoscaling in BRIX Enterprise.
Конец внимание
Uninstall the Linkerd chart with Helm in a Kubernetes cluster
Начало внимание
Before removing the Linkerd add-on component, disable autoscaling on the BRIX application side.
Конец внимание
To delete the Linkerd chart in namespace linkerd
, run the following command:
helm uninstall linkerd -n linkerd