In the Previous post, we discussed abut VMWARE TANZU KUBERNETES GRID (TKG) ARCHITECTURE.
In this post (VMWARE TANZU KUBERNETES GRID (TKG) CLI INSTALLATION – PART 5) we are going to discuss how to install and initialize the Tanzu command line interface (CLI) on a
bootstrap machine. As discussed in one of my previous post about bootstrapping. Bootstrap machine is server or client machine that you use to deploy management and workload clusters from. Once the Tanzu CLI is installed, we can start deploying Tanzu Kubernetes Grid using the Tanzu CLI to create management cluster on the platform that you use. And later The Tanzu CLI then communicates with the management cluster to create and manage workload clusters for Day 2 prospective.
VMware supports Tanzu CLI binaries for Linux, MacOS, and Windows systems, which can be downloaded from VMware Product Download (https://my.vmware.com/en/web/vmware/downloads/#all_products) site.
Download Tanzu CLI and kubectl
- Go to https://my.vmware.com/en/web/vmware/downloads/#all_products and log in with your My VMware credentials, which must have permission to download binaries.
- Go to All Downloads -> Infrastructure & Operations Management -> VMware Tanzu Kubernetes Grid -> Click Download Product.
3. Under Download VMware Tanzu Kubernetes Grid Page -> Select VMware Tanzu Kubernetes Grid -> and Click GO TO DOWNLOADS.
4. Select the correct VMware Tanzu CLI Version and Platform on which you want to install. (In my case, I am downloading VMware Tanzu CLI for Windows). And Click Download Now.
5. Go to the Kubectl 1.20.5 for VMware Tanzu Kubernetes Grid 1.3.1 section of the download page. And Select the correct platform and version of Kubectl to install. (In my case, I am downloading kubectl cluster cli v1.20.5 for Windows). And Click Download Now.
6. On the system, where you want to install Tanzu command line interface (CLI) and Kubectl, create a new directory named tanzu.
7. Copy the downloaded binaries to tanzu folder and Unpack them using
tar -xvf command.
After you unpack the binaries, you will see a cli folder with multiple
subfolders and files.
8. Unzip the kubectl binary file from kubectl-windows-v1.20.5-vmware.1.exe.gz
Install the Tanzu CLI
Now we are ready to Install the Tanzu CLI. I am going to install this on Windows Server, If you need to install on Linux or MacOS. Please refer the VMware document how to install on Linux / MacOS.
- Create a new folder under Program Files\Tanzu.
- copy the core\v1.3.0\tanzu-corewindows_
amd64.exe file from CLI folder into the new Program Files\tanzu folder.
3. Just to simplify, rename the tanzu-core-windows_amd64.exe to tanzu.exe.
4. Make sure you have Full Control permission on tanzu folder.
5. Now set Environment Variables for Tanzu CLI.
7. After we have installed the tanzu core executable, must install the CLI plugins related to Tanzu Kubernetes cluster management and feature operations.
8. Navigate to the tanzu folder that contains the cli folder and Run the below command from the tanzu directory to install all the plugins.
- tanzu plugin install –local cli all
- tanzu plugin list
you can see list of all installed plugins as showing below.
Now let’s install kubectl compatible with the Tanzu CLI.
- Navigate to the folder where we have downloaded for kubectl executable.
- Just to simplify, rename the kubectl-windows-v1.20.5-vmware.1.exe to kubectl.exe.
- Run the below command to check the installed kubectl version
- kubectl version
With the Tanzu CLI installed, we are ready to set up and use bootstrap machine to deploy Kubernetes clusters to on-premises infrastructure (vSphere) or running on Public Cloud (Amazon EC2 and Microsoft Azure).
That’s all about Installing Tanzu CLI and kubectl, In the next post will discuss about how to deploy management clusters (VMware Tanzu Kubernetes Grid (TKG) Deploy Management Cluster – Part 6). Stay tuned for next post.
Hope this will be informative. Happy learning and happy sharing