Getting started with Tanzu Community Edition – Unmanaged clusters
Since the acquisition of many cloud native companies by VMware, the VMware Tanzu portfolio has been ever growing with an increasing number of adopters. Because the commercial offering of VMware Tanzu is fairly expensive and involves having a significant amount of resources with NSX-T in place, Tanzu Community Edition (TCE) is a great alternative to run Kubernetes clusters and experiment with the Tanzu CLI.
What is Tanzu Community Edition?
Kubernetes has been a growing ecosystem for the past 6 years or so which facilitates running container workloads at scale. However, creating and managing Kubernetes clusters can prove tricky as it remains a complex system. VMware Tanzu Community Edition simplifies the lifecycle of kubernetes clusters by leveraging the Cluster API open-source project which expands the capabilities of Kubernetes by offering the possibility to interface with many cloud providers such as AWS, Azure, vSphere, VMware Cloud Director and so on to provision Kubernetes workload clusters, you can also easily install packages, configuration authentication and so on.
TCE managed clusters
TCE managed clusters are made of a management cluster from where you can create workload clusters on one of the configured cloud providers mentioned above. These extra capabilities are in the form of Custom Resource Definitions (CRD) and a controller that knows how to “speak” to these cloud providers through their API in order to deploy the nodes as VMs and then create a cluster with kubeadm.
In a nutshell, you can create kubernetes clusters (workload clusters) from a kubernetes cluster (management cluster).
Unmanaged clusters
In this article however, we are going to create what is called an unmanaged cluster. Unmanaged clusters are the first step to get into Tanzu. It deploys a basic Kubernetes cluster in Docker with Kind on your local machine. You can then interact with it like you would on any workload cluster. You can install packages, configure authentication and so on.
Install the Tanzu CLI
For the sake of disclosure, I use Ubuntu in WSL with the Docker integration but you can find the procedure for Windows and Mac as well. Note that you must run vSphere 6.7u3 or later
- Before starting, you need to ensure that you have kubectl and docker installed
- Download the release you want to install. v0.12.1 is the latest at the time of this writing but you may want to install a newer one. Note that you need curl, grep, sed, tr, and jq for the script to work
- Then unpack the release and run the install script
- At this point you should have the Tanzu CLI installed, you can check the version
cd tce-linux-amd64-v0.12.0
./install.sh
version: v0.11.4
buildDate: 2022-05-17
sha: a9b8f3a
Install an Tanzu Unmanaged cluster
At this point we are ready to start with the creation of a TCE unmanaged cluster. Again, make sure that Kind is available in the PATH, that you have internet access and that Docker is running.
- Create an unmanaged cluster with the Tanzu cli. In this example I am deploying a cluster with the default number of control plane nodes (1 as I did not specify it) and with 2 worker nodes. I also choose to install Antrea instead of Calico as the CNI
- List the nodes present in the cluster. As you can see there is one control plane node and 2 worker nodes
- You should see the pods running in the kube-system namespace
It will take a bit of time, especially if it is the first time as docker needs to pull the images from the internet.
Note that it will automatically change your current Kubernetes context to the newly created unmanaged cluster.
NAME STATUS ROLES AGE VERSION
vembu-tce-control-plane Ready control-plane,master 11m v1.22.7
vembu-tce-worker Ready 10m v1.22.7
vembu-tce-worker2 Ready 10m v1.22.7
At this point you now have a working Tanzu Community Edition development cluster.
Deploy packages to your TCE cluster
Tanzu Community Edition integrates with kapp from Carvel to deploy packages to a kubernetes cluster. A package is a group of Kubernetes resources that form an application as it were. The Tanzu package cli simplifies the management of apps in your cluster.
- List available package in the default package repository
- For instance, let’s install Velero, a backup and disaster recovery solution for Kubernetes. You can first display the available versions
- Install the latest version with the following command
- You can now list the install packages and Velero should be in the list
As you can see there are a number of packages that you can install in your cluster. For instance you can install the FluxCD controller to manage your cluster from a Git repository, or Grafana and Prometheus to get observability capabilities.
We won’t go into the configuration as this is out of scope. The goal here is to show you how to use the tanzu cli, however, you can refer to the official Velero documentation to learn more.
Wrap up
As you can see, getting started with VMware Tanzu Community Edition is really simple and doesn’t take much time. You will get the chance to experiment with Kubernetes and the tanzu cli in a matter of minutes. You can then easily delete and recreate clusters at your convenience.
Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.