This document describes how to Set Kubernetes cluster context, Install Cluster Essentials for VMware Tanzu, and Install or Update the Tanzu CLI and plug-ins for Tanzu Application Platform:
To set the Kubernetes cluster context:
-
List the existing contexts by running:
kubectl config get-contexts
For example:
$ kubectl config get-contexts CURRENT NAME CLUSTER AUTHINFO NAMESPACE aks-repo-trial aks-repo-trial clusterUser_aks-rg-01_aks-repo-trial * aks-tap-cluster aks-tap-cluster clusterUser_aks-rg-01_aks-tap-cluster
-
Set the context to the cluster that you want to use for the Tanzu Application Platform packages install. For example, set the context to the
aks-tap-cluster
context by running:kubectl config use-context aks-tap-cluster
For example:
$ kubectl config use-context aks-tap-cluster Switched to context "aks-tap-cluster".
For other Kubernetes providers, follow the steps below:
-
Sign in to Tanzu Network.
-
Navigate to Cluster Essentials for VMware Tanzu on Tanzu Network.
-
Download
tanzu-cluster-essentials-darwin-amd64-1.0.0.tgz
(for OS X) ortanzu-cluster-essentials-linux-amd64-1.0.0.tgz
(for Linux) and unpack the TAR file intotanzu-cluster-essentials
directory:mkdir $HOME/tanzu-cluster-essentials tar -xvf tanzu-cluster-essentials-darwin-amd64-1.0.0.tgz -C $HOME/tanzu-cluster-essentials
-
Configure and run
install.sh
, which installs kapp-controller and secretgen-controller on your cluster:export INSTALL_BUNDLE=registry.tanzu.vmware.com/tanzu-cluster-essentials/cluster-essentials-bundle@sha256:82dfaf70656b54dcba0d4def85ccae1578ff27054e7533d08320244af7fb0343 export INSTALL_REGISTRY_HOSTNAME=registry.tanzu.vmware.com export INSTALL_REGISTRY_USERNAME=TANZU-NET-USER export INSTALL_REGISTRY_PASSWORD=TANZU-NET-PASSWORD cd $HOME/tanzu-cluster-essentials ./install.sh
Where
TANZU-NET-USER
andTANZU-NET-PASSWORD
are your credentials for Tanzu Network. -
Install the
kapp
CLI onto your$PATH
:sudo cp $HOME/tanzu-cluster-essentials/kapp /usr/local/bin/kapp
Choose the install scenario that is right for you:
- Instructions for a clean install of Tanzu CLI
- Instructions for updating Tanzu CLI that was installed for a previous Tanzu Application Platform release
To perform a clean installation of Tanzu CLI:
-
If applicable, uninstall Tanzu CLI, plug-ins, and associated files by following the steps in Remove Tanzu CLI, plug-ins, and associated files.
-
Follow the procedure for your operating system:
To install the Tanzu CLI on a Linux operating system:
-
Create a directory named
tanzu
by running:mkdir $HOME/tanzu
-
Sign in to Tanzu Network.
-
Navigate to Tanzu Application Platform on Tanzu Network.
-
Click the
tanzu-cli-v0.11.1
folder. -
Download
tanzu-framework-bundle-linux
and unpack the TAR file into thetanzu
directory by running:tar -xvf tanzu-framework-linux-amd64.tar -C $HOME/tanzu
-
Set env var
TANZU_CLI_NO_INIT
totrue
to assure the local downloaded versions of the CLI core and plug-ins are installed:export TANZU_CLI_NO_INIT=true
-
Install the CLI core by running:
cd $HOME/tanzu sudo install cli/core/v0.11.1/tanzu-core-linux_amd64 /usr/local/bin/tanzu
-
Confirm installation of the CLI core by running:
tanzu version
Expected output:
version: v0.11.1
-
Proceed to Instructions for a clean install of Tanzu CLI plug-ins.
To install the Tanzu CLI on a Mac operating system:
-
Create a directory named
tanzu
:mkdir $HOME/tanzu
-
Sign in to Tanzu Network.
-
Navigate to Tanzu Application Platform on Tanzu Network.
-
Click the
tanzu-cli-v0.11.1
folder. -
Download
tanzu-framework-bundle-mac
and unpack the TAR file into thetanzu
directory:tar -xvf tanzu-framework-darwin-amd64.tar -C $HOME/tanzu
-
Set env var
TANZU_CLI_NO_INIT
totrue
to assure the local downloaded versions of the CLI core and plug-ins are installed:export TANZU_CLI_NO_INIT=true
-
Install the CLI core by running:
cd $HOME/tanzu install cli/core/v0.11.1/tanzu-core-darwin_amd64 /usr/local/bin/tanzu
-
Confirm installation of the CLI core by running:
tanzu version
Expected output:
version: v0.11.1
If you see the following warning when running
Tanzu version
on macOS:"tanzu" cannot be opened because the developer cannot be verified
To resolve this error, do the following:
-
Click Cancel in the macOS prompt window.
-
Open the Security & Privacy control panel from System Preferences.
-
Click General.
-
Click Allow Anyway next to the warning message for the Tanzu binary.
-
Enter your system username and password in the macOS prompt window to confirm the changes.
-
Execute the
Tanzu version
command in the terminal window again. -
Click Open in the macOS prompt window. After completing the steps above, there should be no more security issues while running Tanzu CLI commands.
-
Proceed to Instructions for a clean install of Tanzu CLI plug-ins.
-
To install the Tanzu CLI on a Windows operating system:
-
Create a directory called
tanzu-bundle
. -
Sign in to Tanzu Network.
-
Navigate to Tanzu Application Platform on Tanzu Network.
-
Click the
tanzu-cli-v0.11.1
folder. -
Download
tanzu-framework-bundle-windows
and unpack the TAR files into thetanzu-bundle
directory. -
Create a new
Program Files\tanzu
folder. -
In the unpacked CLI folder tanzu-bundle, locate and copy the
core/v0.11.1/tanzu-core-windows_amd64.exe
into the newProgram Files\tanzu
folder. -
Rename
tanzu-core-windows_amd64.exe
totanzu.exe
. -
Right-click the
tanzu
folder, select Properties > Security, and make sure that your user account has the Full Control permission. -
Use Windows Search to search for
env
. -
Select Edit the system environment variables, and click Environment Variables.
-
Select the Path row under System variables, and click Edit.
-
Click New to add a new row, and enter the path to the Tanzu CLI.
-
Set the environmental variable
TANZU_CLI_NO_INIT
totrue
. -
From the
tanzu
directory, confirm the installation of the Tanzu CLI by running the following command in a terminal window:tanzu version
Expected output:
version: v0.11.1
-
Proceed to Clean Install Tanzu CLI plug-ins
To perform a clean installation of the Tanzu CLI plug-ins:
-
If it hasn't been done already, set env var
TANZU_CLI_NO_INIT
totrue
to assure the locally downloaded plug-ins are installed:export TANZU_CLI_NO_INIT=true
-
From your
tanzu
directory, Install the local versions of the plug-ins you downloaded by running:cd $HOME/tanzu tanzu plugin install --local cli all
-
Check the plug-in installation status by running:
tanzu plugin list
Expect to see the following:
tanzu plugin list NAME DESCRIPTION SCOPE DISCOVERY VERSION STATUS login Login to the platform Standalone default v0.11.1 not installed management-cluster Kubernetes management-cluster operations Standalone default v0.11.1 not installed package Tanzu package management Standalone default v0.11.1 installed pinniped-auth Pinniped authentication operations (usually not directly invoked) Standalone default v0.11.1 not installed secret Tanzu secret management Standalone default v0.11.1 installed accelerator Manage accelerators in a Kubernetes cluster Standalone v1.0.1 installed apps Applications on Kubernetes Standalone v0.4.1 installed services Discover Service Types and manage Service Instances (ALPHA) Standalone v0.1.1 installed
Ensure that you have the
accelerator
,apps
,package
,secret
, andservices
plug-ins. You need these plug-ins to install and interact with the Tanzu Application Platform.Tanzu Application Platform requires cluster-admin privileges. Running commands associated with the additional plug-ins can have unintended side effects. VMware recommends against running
cluster
,kubernetes-release
,login
,management-cluster
, andpinniped-auth
commands.
You can now proceed with installing Tanzu Application Platform. For more information, see Installing the Tanzu Application Platform Package and Profiles.
Instructions for updating Tanzu CLI that was installed for a previous release of Tanzu Application Platform
Follow these instructions to update the Tanzu CLI that was installed for a previous release of Tanzu Application Platform:
- If your Tanzu CLI version is greater than
v0.11.1
, you must delete your existing Tanzu CLI, plug-ins, and associated files and then perform a clean install - If your Tanzu CLI version is less than or equal to
v0.11.1
, proceed to step 1.
Steps:
-
If a directory called
tanzu
does not exist, create one by running:mkdir $HOME/tanzu
-
Sign in to Tanzu Network.
-
Navigate to Tanzu Application Platform on Tanzu Network.
-
Click the tanzu-cli-v0.11.1 directory.
-
Download the CLI bundle corresponding with your operating system. For example, if your client operating system is Linux, download the
tanzu-framework-linux-amd64.tar
bundle. -
If they exist, delete any CLI files from previous installs by running:
rm -rf $HOME/tanzu/cli
-
Unpack the TAR file in the
tanzu
directory by running:tar -xvf tanzu-framework-linux-amd64.tar -C $HOME/tanzu
-
Navigate to the
tanzu
directory by running:cd $HOME/tanzu
-
Set env var
TANZU_CLI_NO_INIT
totrue
to install the local versions of the CLI core and plug-ins you've downloaded:export TANZU_CLI_NO_INIT=true
-
Update the core CLI by running:
tanzu update --local ./cli
Expect to see a user prompt - submit
y
-
Check installation status for the core CLI by running:
tanzu version
Expected output:
version: v0.11.1
-
Install new plug-in versions by running:
tanzu plugin install --local cli all
-
Check installation status for plug-ins by running:
tanzu plugin list
Expect to see the following:
tanzu plugin list NAME DESCRIPTION SCOPE DISCOVERY VERSION STATUS login Login to the platform Standalone default v0.11.1 not installed management-cluster Kubernetes management-cluster operations Standalone default v0.11.1 not installed package Tanzu package management Standalone default v0.11.1 installed pinniped-auth Pinniped authentication operations (usually not directly invoked) Standalone default v0.11.1 not installed secret Tanzu secret management Standalone default v0.11.1 installed accelerator Manage accelerators in a Kubernetes cluster Standalone v1.0.1 installed apps Applications on Kubernetes Standalone v0.4.1 installed services Discover Service Types and manage Service Instances (ALPHA) Standalone v0.1.1 installed
You can now install Tanzu Application Platform. See Installing the Tanzu Application Platform Package and Profiles.