Hands-On with VMware Tanzu Community Edition - vSphere Option
Hands-On with
vSphere Option
(Image Credit: This Page)
Why
How
Install Tanzu Prerequisites
Install Tanzu CLI on MacOS
$ brew tap vmware-tanzu/tanzu ==> Tapping vmware-tanzu/tanzu Cloning into '/usr/local/Homebrew/Library/Taps/vmware-tanzu/homebrew-tanzu'... remote: Enumerating objects: 82, done. remote: Counting objects: 100% (82/82), done. remote: Compressing objects: 100% (66/66), done. remote: Total 82 (delta 35), reused 37 (delta 12), pack-reused 0 Unpacking objects: 100% (82/82), done. Tapped 1 formula (105 files, 96KB).
$ brew install tanzu-community-edition ==> Downloading https://github.com/vmware-tanzu/community-edition/releases/download/v0.9.1/tce-darwin-amd64-v0.9.1.tar.gz Already downloaded: /Users/faucherd/Library/Caches/Homebrew/downloads/57aa013fd7f19014e9345d7c2e77fcd37ec0dfcf82221f04bfb406d1079a71d2--tce-darwin-amd64-v0.9.1.tar.gz ==> Installing tanzu-community-edition from vmware-tanzu/tanzu ==> Thanks for installing Tanzu Community Edition! ==> The Tanzu CLI has been installed on your system ==> ==> ****************************************************************************** ==> * To initialize all plugins required by Tanzu Community Edition, an additional ==> * step is required. To complete the installation, please run the following ==> * shell script: ==> * ==> * /usr/local/Cellar/tanzu-community-edition/v0.9.1/libexec/configure-tce.sh ==> * ==> ****************************************************************************** ==> ==> * To cleanup and remove Tanzu Community Edition from your system, run the ==> * following script: ==> /usr/local/Cellar/tanzu-community-edition/v0.9.1/libexec/uninstall.sh ==> 🍺 /usr/local/Cellar/tanzu-community-edition/v0.9.1: 15 files, 642.6MB, built in 12 seconds $ /usr/local/Cellar/tanzu-community-edition/v0.9.1/libexec/configure-tce.sh MY_DIR: /usr/local/Cellar/tanzu-community-edition/v0.9.1/libexec /Users/faucherd/Library/Application Support Removing old plugin cache from /Users/faucherd/.cache/tanzu/catalog.yaml Making a backup of your Kubernetes config files into /tmp | initializing ✔ successfully initialized CLI Installation complete!
Deploy a Kubernetes Cluster on vSphere from MacOS with TCE
Create a Tanzu Kubernetes VM Template in vSphere
Start the Tanzu Community Edition Installer
$ tanzu management-cluster create --ui
Validating the pre-requisites...
Serving kickstart UI at http://127.0.0.1:8080
Step 1: IaaS Provider
Paste in the RSA public key that you will use to ssh to the Kubernetes components running in vSphere. If you do not have an RSA private/public key pair already, just run these commands:
$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/Users/faucherd/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/faucherd/.ssh/id_rsa. Your public key has been saved in /Users/faucherd/.ssh/id_rsa.pub. The key fingerprint is: SHA256:ChangeMeO1NcPBKWyEVTrgzj39LO5dRx9YGOTQIOKhE faucherd@dennis-mbp The key's randomart image is: +---[RSA 3072]----+ | E.. =*+. | | . Boo=. . | | . .= o.=. o ..| | .. O = .* +| | o S .. o. o| | Scary . o | | B = o o . | | . * + + | | ... o . | +----[SHA256]-----+ $ pbcopy < ~/.ssh/id_rsa.pub
Step 2: Standalone Cluster Settings
Choose a name for your cluster, a Load Balancer type (I don’t have NSX installed), and an available static IP address for the load balancer.
Click Next
Step 3: VMware NSX Advanced Load Balancer
Step 5: Resources
Choose your VM folder for your Kubernetes nodes from the drop down, choose your datastore for your Kubernetes nodes from the drop down, choose which hosts or clusters to deploy the nodes to and click Next.
Step 6: Kubernetes Network
Choose your VM network from the drop down, leave the default internal only CIDRs or choose your own, define your proxy if one is needed to reach the external network and click Next.
Step 7: Identity Management
Step 8: OS Image
Choose the kubernetes VM template you created from the drop down and click Next then click Review Configuration.
Review Configuration
The Review Configuration page will display all the data you entered and also display the tanzu command that will be run and the custom YAML path that will be used as input.
Deploy
Now, things will start happening. You can track the progress in the Installer window and watch vSphere tasks get kicked off in the vCenter UI.
Validate the Kubernetes Cluster
Create a Kubernetes Workload Cluster for Applications
Set your kubectl context to the management cluster
Validate Access to Kubernetes
Find Management Cluster YAML Name and Make a Copy
Edit workload1.yaml
Create the Workload Cluster
Install an Application
Use The Octant Kubernetes Dashboard
Install & Run Octant