This topic describes how to integrate VMware Tanzu Kubernetes Grid Integrated Edition with VMware Tanzu Service Mesh by VMware NSX.
Tanzu Service Mesh brings application-layer visibility, control, and security to microservices deployed on VMware Tanzu Kubernetes Grid Integrated Edition-managed Kubernetes clusters.
VMware Tanzu Service Mesh provides a service mesh solution for Kubernetes based on the NSX platform. Tanzu Service Mesh gives Kubernetes cluster users API-level visibility, control, and security over their clusters’ services, data, and users.
In a Kubernetes cluster, Tanzu Service Mesh runs as a pod and is deployed using a YAML file.
For more information, see NSX Service Mesh on VMware Tanzu: CONNECT & PROTECT Applications Across Your Kubernetes Clusters and Clouds in the VMware Network Virtualization blog.
These instructions assume that:
You have deployed VMware Tanzu Kubernetes Grid Integrated Edition.
You have provisioned a target Kubernetes cluster for Tanzu Service Mesh.
You have an account with VMware Cloud Services. If you do not already have an account, register as follows:
Install VMware Tanzu Service Mesh in a cluster as follows:
Log in to the VMware Cloud Services console.
Select your organization or create a new one.
Select the Tanzu Service Mesh service offering and add your account to the service.
Complete the following steps to install Tanzu Service Mesh onto a TKGI-provisioned Kubernetes cluster.
Sign in to the VMware Tanzu Service Mesh by VMware NSX console.
In the upper-left corner of the Tanzu Service Mesh Console, click Add New > Onboard New Cluster to open the Onboard Clusters panel. If this is the first cluster onboarded to Tanzu Service Mesh, the Onboard Clusters panel appears automatically when you finish signing up for Tanzu Service Mesh.
In the Onboard Clusters panel, enter a name for Tanzu Service Mesh to use to identify the target cluster.
Click Generate Security Token to generate a security token.
In the Onboard Clusters panel, click the copy icon to copy the kubectl apply
command that applies the registration YAML file to the cluster.
Log in to your TKGI-provisioned Kubernetes cluster.
Run the kubectl apply
command that you copied in a previous step to apply the registration YAML to the cluster. For example:
kubectl apply -f https://prod-1.servicemesh.biz/cluster-registration/k8s/v0.8.5/k8s-registration.yaml
In the Onboard Clusters panel, click the copy icon to copy the kubectl create secret
command that establishes a secure connection with NSX Service Mesh.
From your cluster, run the kubectl create secret
command that you copied in the previous step. For example:
kubectl -n allspark create secret generic cluster-token --from-literal=token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.xxxxxxxxxxxx
Click Install NSX Service Mesh button to install Tanzu Service Mesh on the cluster.
The YAML file deploys a pod to the target Kubernetes cluster that includes the Tanzu Service Mesh agent. If the target cluster is not discovered, click Exit and Reload and try again.
Once the Tanzu Service Mesh agent is correctly started on a cluster:
After you have onboarded clusters to Tanzu Service Mesh and installed Istio, they should appear in your Tanzu Service Mesh console.
When the tkgi delete cluster
command is issued, the system runs an errand to clean up the pods currently running in the cluster. Istio installs a few pods that have a Pod Disruption Budget that conflict with the Tanzu Kubernetes Grid Integrated Edition cleanup errand. This may result in the errand running for an extended period of time.
Tanzu Kubernetes Grid Integrated Edition allows the user to select a timeout for Pod Disruption Budget, and the errand runs up to that timeout.
Workaround
To avoid this problem, try to remove the on-boarded cluster as follows:
Log on to the Tanzu Service Mesh console and click on the name of cluster you want to remove.
Near the top right corner, click Remove Cluster.
If this operation is successful, you can safely run the following command to delete the cluster:
tkgi delete-cluster
If the operation is not successful, run the following command on the cluster before attempting to delete it with the tkgi delete-cluster
command:
kubectl delete namespace istio-system