Recipes -Linkerd Service Mesh - Rafay Product Documentation

Overview

Overview

Linkerd is a service mesh for Kubernetes with the following functionalities:


What Will You Do

In this exercise,

Important

This tutorial describes the steps to create and use a Linkerd based blueprint using the Web Console. The workflow can also be fully automated and embedded into an automation pipeline.


Assumptions


Step 1: Generate identity certificates

You'll need 2 certificates

  1. Trust Anchor certificate
  2. Issuer certificate

You can generate them easily using a tool like step. You can use other tools like openssl as long as the certificate uses ECDSA P-256 algorithm which is a default in step.

Trust anchor certificate

Generate the root certificate with its private key using step.

step certificate create root.linkerd.cluster.local ca.crt ca.key --profile root-ca --no-password --insecure

For a longer-lived trust anchor certificate, pass the --not-after argument to the step command with the desired value (e.g. --not-after=87600h).

This will generate 2 file viz. ca.crt and ca.key.

Issuer Certificate and key

Generate the intermediate certificate and key pair that will be used to sign the Linkerd proxies’ CSR.

step certificate create identity.linkerd.cluster.local issuer.crt issuer.key --profile intermediate-ca --not-after 8760h --no-password --insecure --ca ca.crt --ca-key ca.key

This will generate 2 file viz. issuer.crt and issuer.key.


Step 2: Create Linkerd add-on from catalog

Linkerd is available in the Rafay System catalog making its deployment straightforward.


Step 3: Create Blueprint

Now, we are ready to assemble a custom cluster blueprint using this addon.


Step 4: Apply Blueprint

Now, we are ready to apply this blueprint to a cluster.

This will start the deployment of the addons configured in the "linkerd" blueprint to the targeted cluster. The blueprint sync process can take a few minutes. Once complete, the cluster will display the current cluster blueprint details and whether the sync was successful or not.


Step 5: Verify Deployment

Users can optionally verify whether the correct resources have been created on the cluster.

First, we will verify if the linkerd namespace has been created

kubectl get ns linkerd

Next, we will verify if the pods are healthy in the "linkerd" namespace

kubectl get po -n linkerd
NAME                                      READY   STATUS    RESTARTS   AGE
linkerd-destination-7f5d97db44-mgnn8      4/4     Running   0          3m28s
linkerd-identity-7485fb7d8f-497lc         2/2     Running   0          3m28s
linkerd-proxy-injector-68dd5776f6-4prs8   2/2     Running   0          3m28s

Recap

Congratulations! You have successfully created a custom cluster blueprint with the linkerd addon and applied to a cluster.