Skip to main content

Install TANZU CLI in Linux for Vsphere with Tanzu

The VMware Tanzu command-line interface (Tanzu CLI) is a command-line tool that connects you to Tanzu. Just like Kubectl CLI. For example, you can use the Tanzu CLI to: Create and manage management clusters. Create and manage workload clusters. Manage Kubernetes releases




The first thing to ensure is that it aligns with or is compatible with the Kubernetes cluster version, just like you would when installing the kubectl client.

When working with packages in a Tanzu Kubernetes Cluster (TKC) and utilizing the Tanzu CLI, it becomes highly beneficial for managing packages within the Tanzu Cluster.

Installation

To obtain the binary corresponding to your cluster version, please use the provided link. To successfully download the binary, you must have access to the VMware portal and select the highlighted version




After downloading the files, transfer the binaries to the jump host. While you can download them directly from a Linux machine, in many enterprise environments, URL access might be restricted. Therefore, you may need to follow these manual steps.

Once you've transferred the binaries to the Linux machine, you can extract them using the following command:


tar -xvf <package-name-which is moved> 

I have extracted and changed the directory name as cli-1.6.
Once binary is extracted to directory the enter into the following location as shown

[root@Ibrar-Aziz v0.25.4]# pwd
/root/cli-1.6/core/v0.25.4

[root@Ibrar-Aziz v0.25.4]# ls
tanzu-core-linux_amd64

Now install the package with following command

sudo install  tanzu-core-linux_amd64 /usr/local/bin/tanzu

Once done the see the list of availble list of plugins with following commands

[root@Ibrar-Aziz cli-1.6]# tanzu plugin list

if not present try to clean and  sync it with following commmand 

[root@Ibrar-Aziz cli-1.6]# tanzu plugin clean
then,
[root@Ibrar-Aziz cli-1.6]# tanzu plugin sync
Checking for required plugins...
All required plugins are already installed and up-to-date
✔  Done

then again run the previous command  to see the available list and output is as below:

One more thing these tanzu CLI package come with Carvel Tools as well and placed at following paths.

The Carvel open-source project provides a set of reliable, single-purpose, composable tools that aid in application building, configuration, and deployment to Kubernetes.
Tanzu Kubernetes Grid provides signed binaries for ytt, kapp, kbld, and imgpkg (Carvel Tools)

We can install them with following commands as 

Install ytt

gunzip ytt-linux-amd64-v0.41.1+vmware.1.gz

chmod ugo+x ytt-linux-amd64-v0.41.1+vmware.1

mv ./ytt-linux-amd64-v0.41.1+vmware.1 /usr/local/bin/ytt

ytt --version


Install ytt
gunzip kapp-linux-amd64-v0.49.0+vmware.1.gz
chmod ugo+x kapp-linux-amd64-v0.49.0+vmware.1
mv ./kapp-linux-amd64-v0.49.0+vmware.1 /usr/local/bin/kapp
kapp --version

Install kbld
gunzip kbld-linux-amd64-v0.34.0+vmware.1.gz
chmod ugo+x kbld-linux-amd64-v0.34.0+vmware.1
mv ./kbld-linux-amd64-v0.34.0+vmware.1 /usr/local/bin/kbld
kbld --version

Install imgpkg
gunzip imgpkg-linux-amd64-v0.29.0+vmware.1.gz
chmod ugo+x imgpkg-linux-amd64-v0.29.0+vmware.1
mv ./imgpkg-linux-amd64-v0.29.0+vmware.1 /usr/local/bin/imgpkg
imgpkg --version



Working of Tanzu CLI into Cluster 

Login to tkc cluster then start exploring it as below to list the package if installed 

[root@Ibrar-Aziz cli-1.6]# kapp ls -A

Target cluster 'https://x.x.x.x:6443' (nodes: tkc-shared-svc-control-plane-zfftx, 5+)

Apps in all namespaces

Namespace                       Name                 Namespaces                                Lcs   Lca
cert-manager                    cert-manager-ctrl    (cluster),cert-manager,kube-system        true  2d
default                         grafana-ctrl         (cluster),tanzu-system-dashboards         true  1d
^                               prometheus-ctrl      (cluster),tanzu-system-monitoring         true  1d
tanzu-package-repo-global       tanzu-standard-ctrl  tanzu-package-repo-global                 true  8m
tanzu-system-ingress            contour-ctrl         (cluster),tanzu-system-ingress            true  2d
tanzu-system-logging            fluent-bit-ctrl      (cluster),tanzu-system-logging            true  1d
tanzu-system-registry           harbor-ctrl          (cluster),tanzu-system-registry           true  1d
tanzu-system-service-discovery  external-dns-ctrl    (cluster),tanzu-system-service-discovery  true  1d
tkg-system                      tanzu-standard.pkgr  tkg-system                                true  6d

Lcs: Last Change Successful
Lca: Last Change Age

9 apps

Succeeded

[root@Ibrar-Aziz cli-1.6]# tanzu package installed list -A

  NAME          PACKAGE-NAME                   PACKAGE-VERSION        STATUS               NAMESPACE
  cert-manager  cert-manager.tanzu.vmware.com  1.5.3+vmware.4-tkg.1   Reconcile succeeded  cert-manager
  grafana       grafana.tanzu.vmware.com       7.5.7+vmware.1-tkg.1   Reconcile succeeded  default
  prometheus    prometheus.tanzu.vmware.com    2.36.2+vmware.1-tkg.1  Reconcile succeeded  default
  contour       contour.tanzu.vmware.com       1.20.2+vmware.1-tkg.1  Reconcile succeeded  tanzu-system-ingress
  fluent-bit    fluent-bit.tanzu.vmware.com    1.7.5+vmware.1-tkg.1   Reconcile succeeded  tanzu-system-logging
  harbor        harbor.tanzu.vmware.com        2.3.3+vmware.1-tkg.1   Reconcile succeeded  tanzu-system-registry
  external-dns  external-dns.tanzu.vmware.com  0.11.0+vmware.1-tkg.2  Reconcile succeeded  tanzu-system-service-discovery


root@Ibrar-Aziz ~]# tanzu package available list -A

  NAME                                          DISPLAY-NAME               SHORT-DESCRIPTION                                                                 LATEST-VERSION         NAMESPACE
  cert-manager.tanzu.vmware.com                 cert-manager               Certificate management                                                            1.7.2+vmware.1-tkg.1   tanzu-package-repo-global
  contour.tanzu.vmware.com                      contour                    An ingress controller                                                             1.20.2+vmware.1-tkg.1  tanzu-package-repo-global
  external-dns.tanzu.vmware.com                 external-dns               This package provides DNS synchronization functionality.                          0.11.0+vmware.1-tkg.2  tanzu-package-repo-global
  fluent-bit.tanzu.vmware.com                   fluent-bit                 Fluent Bit is a fast Log Processor and Forwarder                                  1.8.15+vmware.1-tkg.1  tanzu-package-repo-global
  fluxcd-helm-controller.tanzu.vmware.com       Flux Helm Controller       Helm controller is one of the components in FluxCD GitOps toolkit.                0.21.0+vmware.1-tkg.1  tanzu-package-repo-global
  fluxcd-kustomize-controller.tanzu.vmware.com  Flux Kustomize Controller  Kustomize controller is one of the components in Fluxcd GitOps toolkit.           0.24.4+vmware.1-tkg.1  tanzu-package-repo-global
  fluxcd-source-controller.tanzu.vmware.com     Flux Source Controller     The source-controller is a Kubernetes operator, specialised in artifacts          0.24.4+vmware.1-tkg.4  tanzu-package-repo-global
                                                                           acquisition from external sources such as Git, Helm repositories and S3 buckets.             
  grafana.tanzu.vmware.com                      grafana                    Visualization and analytics software                                              7.5.16+vmware.1-tkg.1  tanzu-package-repo-global
  harbor.tanzu.vmware.com                       harbor                     OCI Registry                                                                      2.5.3+vmware.1-tkg.1   tanzu-package-repo-global
  multus-cni.tanzu.vmware.com                   multus-cni                 This package provides the ability for enabling attaching multiple network         3.8.0+vmware.1-tkg.1   tanzu-package-repo-global
                                                                           interfaces to pods in Kubernetes                                                             
  prometheus.tanzu.vmware.com                   prometheus                 A time series database for your metrics                                           2.36.2+vmware.1-tkg.1  tanzu-package-repo-global
  whereabouts.tanzu.vmware.com                  whereabouts                A CNI IPAM plugin that assigns IP addresses cluster-wide                          0.5.1+vmware.2-tkg.1   tanzu-package-repo-global
  cert-manager.tanzu.vmware.com                 cert-manager               Certificate management                                                            1.7.2+vmware.1-tkg.1   tkg-system
  contour.tanzu.vmware.com                      Contour                    An ingress controller                                                             1.20.2+vmware.1-tkg.1  tkg-system
  external-dns.tanzu.vmware.com                 external-dns               This package provides DNS synchronization functionality.                          0.11.0+vmware.1-tkg.2  tkg-system
  fluent-bit.tanzu.vmware.com                   fluent-bit                 Fluent Bit is a fast Log Processor and Forwarder                                  1.8.15+vmware.1-tkg.1  tkg-system
  grafana.tanzu.vmware.com                      grafana                    Visualization and analytics software                                              7.5.16+vmware.1-tkg.1  tkg-system
  harbor.tanzu.vmware.com                       Harbor                     OCI Registry                                                                      2.5.3+vmware.1-tkg.1   tkg-system
  multus-cni.tanzu.vmware.com                   multus-cni                 This package provides the ability for enabling attaching multiple network         3.8.0+vmware.1-tkg.1   tkg-system
                                                                           interfaces to pods in Kubernetes                                                             
  prometheus.tanzu.vmware.com                   prometheus                 A time series database for your metrics                                           2.36.2+vmw

[root@Ibrar-Aziz cli-1.6]# tanzu package repository list -A

  NAME            REPOSITORY                                               TAG     STATUS               DETAILS  NAMESPACE
  tanzu-standard  projects.registry.vmware.com/tkg/packages/standard/repo  v1.6.0  Reconcile succeeded           tanzu-package-repo-global

 Feel Free to query : Click Here 


Comments

Popular posts from this blog

What's New in Red Hat OpenShift 4.17

What's New in Red Hat OpenShift 4.17 Release Overview: · Kubernetes Version:  OpenShift 4.17 is based on Kubernetes 1.30, bringing enhancements and new capabilities. Notable Beta Features: 1.     User Namespaces in Pods:  Enhances security by allowing pods to run with distinct user IDs while mapping to different IDs on the host. 2.     Structured Authentication Configuration:  Provides a more organized approach to managing authentication settings. 3.     Node Memory Swap Support:  Introduces support for memory swapping on nodes, enhancing resource management. 4.     LoadBalancer Behavior Awareness:  Kubernetes can now better understand and manage LoadBalancer behaviors. 5.     CRD Validation Enhancements:  Improves Custom Resource Definition (CRD) validation processes. Stable Features: 1.     Pod Scheduling Readiness:  Ensures that pods are scheduled only when they are ready to run. 2.     Common Expression Language (CEL) for Admission Control:  I

Effortless Management: A Guide to Registering and Unregistering Linux Machines with Red Hat Subscription Manager using CLI with Key benefits

To initiate the registration process for your Linux machine with Red Hat Subscription Manager, the first step is to log in to the official Red Hat site, where licenses are managed. Access the site at https://access.redhat.com and provide your credentials using GUI (Browser) UserName: ee.ibraraziz@gmail.com Password: ************** Follow these steps to register your system using CLI and make sure in restricted environment following address https://access.redhat.com/* is whitelist so that machine can communicate to the redhat offical site: 1. Register the system using the following command:    >>subscription-manager register    You will be prompted to enter your Red Hat account credentials.      UserName: ee.ibraraziz@gmail.com      Password: ************** After successfully logging in,   Additionally, you may need to provide the Pool ID associated with your subscription. Follow the on-screen instructions. 2. Refresh the subscription mana

Choosing the Right OpenShift Service: Service Mesh, Submariner, or Service Interconnect?

In today’s digital world, businesses rely more and more on interconnected applications and services to operate effectively. This means integrating software and data across different environments is essential. However, achieving smooth connectivity can be tough because different application designs and the mix of on-premises and cloud systems often lead to inconsistencies. These issues require careful management to ensure everything runs well, risks are managed effectively, teams have the right skills, and security measures are strong. This article looks at three Red Hat technologies—Red Hat OpenShift Service Mesh and Red Hat Service Interconnect, as well as Submariner—in simple terms. It aims to help you decide which solution is best for your needs. OPENSHIFT Feature Service Mesh (Istio) Service Interconnect Submariner Purpose Manages service-to-service communication within a single cluster. Enables