Tanzu Community Edition - first try!
Today we're gonna take a look at the Tanzu Community Edition which can be freely downloaded from https://tanzucommunityedition.io/download/ , no logins needed, just download.
Based on the platform, download the necessary binary. I am using a Mac so I downloaded the tce-darwin-amd64-v0.11.0.tar.gz file.
Note on the usage of clusters on M1 Macs on the same page.
Note that this needs the tanzu CLI available on your system, if you dont, just unzip the binary package and run through the install.sh script which will install the latest version of the CLI as well.
✘ ~ tar xzvf tce-darwin-amd64-v0.11.0.tar.gz~ cd tce-darwin-amd64-v0.11.0~/tce-darwin-amd64-v0.11.0 ./install.sh+ set +x====================================Installing Tanzu Community Edition====================================Installing tanzu cli to /usr/local/bin/tanzuPassword:Installing plugin 'builder:v0.11.2'✔ successfully installed 'builder' pluginInstalling plugin 'codegen:v0.11.2'✔ successfully installed 'codegen' pluginInstalling plugin 'cluster:v0.11.2'✔ successfully installed 'cluster' pluginInstalling plugin 'kubernetes-release:v0.11.2'✔ successfully installed 'kubernetes-release' pluginInstalling plugin 'login:v0.11.2'✔ successfully installed 'login' pluginInstalling plugin 'management-cluster:v0.11.2'✔ successfully installed 'management-cluster' pluginInstalling plugin 'package:v0.11.2'✔ successfully installed 'package' pluginInstalling plugin 'pinniped-auth:v0.11.2'✔ successfully installed 'pinniped-auth' pluginInstalling plugin 'secret:v0.11.2'✔ successfully installed 'secret' pluginInstalling plugin 'conformance:v0.11.0'✔ successfully installed 'conformance' pluginInstalling plugin 'diagnostics:v0.11.0'✔ successfully installed 'diagnostics' pluginInstalling plugin 'unmanaged-cluster:v0.11.0'✔ successfully installed 'unmanaged-cluster' pluginInstallation complete!Add the path to your $PATH~/tce-darwin-amd64-v0.11.0 sudo nano /etc/pathsCheck if the Tanzu CLI is working.~/tce-darwin-amd64-v0.11.0 tanzu --helpTanzu CLIUsage:tanzu [command]Available command groups:Adminbuilder Build Tanzu componentscodegen Tanzu code generation toolRuncluster Kubernetes cluster operationsconformance Run Sonobuoy conformance tests against clustersdiagnostics Cluster diagnosticskubernetes-release Kubernetes release operationsmanagement-cluster Kubernetes management cluster operationspackage Tanzu package managementsecret Tanzu secret managementunmanaged-cluster Deploy and manage single-node, static, Tanzu clusters.Systemcompletion Output shell completion codeconfig Configuration for the CLIinit Initialize the CLIlogin Login to the platformplugin Manage CLI pluginsupdate Update the CLIversion Version informationFlags:-h, --help help for tanzuUse "tanzu [command] --help" for more information about a command.Not logged inNote the version on the CLI.~/tce-darwin-amd64-v0.11.0 tanzu versionversion: v0.11.2buildDate: 2022-03-24sha: 6431d1d
Let's create our first unmanaged-cluster.
~/tce-darwin-amd64-v0.11.0 tanzu unmanaged-cluster create firstcluster📁 Created cluster directory🔧 Resolving Tanzu Kubernetes Release (TKR)projects.registry.vmware.com/tce/tkr:v0.17.0Downloaded to: /Users/arathod/.config/tanzu/tkg/unmanaged/bom/projects.registry.vmware.com_tce_tkr_v0.17.0Rendered Config: /Users/arathod/.config/tanzu/tkg/unmanaged/firstcluster/config.yamlBootstrap Logs: /Users/arathod/.config/tanzu/tkg/unmanaged/firstcluster/bootstrap.log🔧 Processing Tanzu Kubernetes Release🎨 Selected base imageprojects.registry.vmware.com/tce/kind:v1.22.4📦 Selected core package repositoryprojects.registry.vmware.com/tce/repo-10:0.10.0📦 Selected additional package repositoriesprojects.registry.vmware.com/tce/main:v0.11.0📦 Selected kapp-controller image bundleprojects.registry.vmware.com/tce/kapp-controller-multi-pkg:v0.30.1🚀 Creating cluster firstclusterCluster creation using kind!❤️ Checkout this awesome project at https://kind.sigs.k8s.iofailed to create cluster, Error: system checks detected issues, please resolve first: [minimum 2 GiB of memory is required]Error: exit status 7✖ exit status 7
Uh-oh, I realized, since my last Docker update, the preferences have turned down the Memory from my usual 6GB to 2GB, I tune that back again from the preferences and try again.
✘ ~/tce-darwin-amd64-v0.11.0 tanzu unmanaged-cluster create secondcluster📁 Created cluster directory🔧 Resolving Tanzu Kubernetes Release (TKR)projects.registry.vmware.com/tce/tkr:v0.17.0TKR exists at /Users/arathod/.config/tanzu/tkg/unmanaged/bom/projects.registry.vmware.com_tce_tkr_v0.17.0Rendered Config: /Users/arathod/.config/tanzu/tkg/unmanaged/secondcluster/config.yamlBootstrap Logs: /Users/arathod/.config/tanzu/tkg/unmanaged/secondcluster/bootstrap.log🔧 Processing Tanzu Kubernetes Release🎨 Selected base imageprojects.registry.vmware.com/tce/kind:v1.22.4📦 Selected core package repositoryprojects.registry.vmware.com/tce/repo-10:0.10.0📦 Selected additional package repositoriesprojects.registry.vmware.com/tce/main:v0.11.0📦 Selected kapp-controller image bundleprojects.registry.vmware.com/tce/kapp-controller-multi-pkg:v0.30.1🚀 Creating cluster secondclusterCluster creation using kind!❤️ Checkout this awesome project at https://kind.sigs.k8s.ioBase image downloadedCluster createdTo troubleshoot, use:kubectl ${COMMAND} --kubeconfig /Users/arathod/.config/tanzu/tkg/unmanaged/secondcluster/kube.conf📧 Installing kapp-controllerkapp-controller status: Running📧 Installing package repositoriesCore package repo status: Reconcile succeeded🌐 Installing CNIcalico.community.tanzu.vmware.com:3.22.1✅ Cluster created🎮 kubectl context set to secondclusterView available packages:tanzu package available listView running pods:kubectl get po -ADelete this cluster:tanzu unmanaged delete secondcluster
Voila! we have an Tanzu Community Edition unmanaged-cluster up and running. Notice the change in the CNI from Antrea to Calico. Take a look at https://github.com/vmware-tanzu/community-edition/releases for release notes.
✘ ~/tce-darwin-amd64-v0.11.0 tanzu unmanaged-cluster listNAME PROVIDERfirstcluster kindsecondcluster kind
Looking at the contexts, we see that the current context is set to secondcluster.
~/tce-darwin-amd64-v0.11.0 kubectl config get-contextsCURRENT NAME CLUSTER AUTHINFO NAMESPACE10.156.167.250 10.156.167.250 wcp:10.156.167.250:rbrito@vsphere.local10.186.80.56 10.186.80.56 wcp:10.186.80.56:administrator@vsphere.localar-scc/api-ocp4test-octo-0805-servicemesh-biz:6443/kube:admin api-ocp4test-octo-0805-servicemesh-biz:6443 kube:admin ar-sccdefault/api-ocp4test-octo-0805-servicemesh-biz:6443/kube:admin api-ocp4test-octo-0805-servicemesh-biz:6443 kube:admin defaultdocker-desktop docker-desktop docker-desktopdp-cluster 10.156.173.9 wcp:10.156.173.9:rbrito@vsphere.localkindkind-please kind-please kind-please* kind-secondcluster kind-secondcluster kind-secondclustersfo-w01-ns01 10.156.173.1 wcp:10.156.173.1:rbrito@vsphere.local sfo-w01-ns01sfo-w01-tkc01 10.156.173.1 wcp:10.156.173.1:rbrito@vsphere.local sfo-w01-tkc01velero-cluster-a 10.156.173.16 wcp:10.156.173.16:rbrito@vsphere.localvelero-cluster-b 10.156.173.15 wcp:10.156.173.15:rbrito@vsphere.local
Let's see the nodes on this cluster. If you scroll up while you were deploying the unmanaged cluster, it would show the config file being used /Users/arathod/.config/tanzu/tkg/unmanaged/secondcluster/config.yaml
Feel free to check that out. In there you would see ControlPlaneNodeCount: "1" & WorkerNodeCount: "0".
~/tce-darwin-amd64-v0.11.0 kubectl get nodesNAME STATUS ROLES AGE VERSIONsecondcluster-control-plane Ready control-plane,master 5m22s v1.22.4
Checking out all the namespaces in the cluster.
~/tce-darwin-amd64-v0.11.0 kubectl get ns -ANAME STATUS AGEdefault Active 6m59skube-node-lease Active 7m1skube-public Active 7m1skube-system Active 7m1slocal-path-storage Active 6m56stanzu-package-repo-global Active 6m46stkg-system Active 6m46s
Taking a look under the hood for all the CRDs being created.
~/tce-darwin-amd64-v0.11.0 kubectl get crdsNAME CREATED ATapps.kappctrl.k14s.io 2022-04-07T23:27:51Zbgpconfigurations.crd.projectcalico.org 2022-04-07T23:29:45Zbgppeers.crd.projectcalico.org 2022-04-07T23:29:45Zblockaffinities.crd.projectcalico.org 2022-04-07T23:29:45Zcaliconodestatuses.crd.projectcalico.org 2022-04-07T23:29:45Zclusterinformations.crd.projectcalico.org 2022-04-07T23:29:44Zfelixconfigurations.crd.projectcalico.org 2022-04-07T23:29:44Zglobalnetworkpolicies.crd.projectcalico.org 2022-04-07T23:29:46Zglobalnetworksets.crd.projectcalico.org 2022-04-07T23:29:45Zhostendpoints.crd.projectcalico.org 2022-04-07T23:29:48Zinternalpackagemetadatas.internal.packaging.carvel.dev 2022-04-07T23:27:51Zinternalpackages.internal.packaging.carvel.dev 2022-04-07T23:27:51Zipamblocks.crd.projectcalico.org 2022-04-07T23:29:48Zipamconfigs.crd.projectcalico.org 2022-04-07T23:29:44Zipamhandles.crd.projectcalico.org 2022-04-07T23:29:44Zippools.crd.projectcalico.org 2022-04-07T23:29:47Zipreservations.crd.projectcalico.org 2022-04-07T23:29:47Zkubecontrollersconfigurations.crd.projectcalico.org 2022-04-07T23:29:47Znetworkpolicies.crd.projectcalico.org 2022-04-07T23:29:47Znetworksets.crd.projectcalico.org 2022-04-07T23:29:48Zpackageinstalls.packaging.carvel.dev 2022-04-07T23:27:51Zpackagerepositories.packaging.carvel.dev 2022-04-07T23:27:52Z
Note the CNI is calico.
~/tce-darwin-amd64-v0.11.0 kubectl get all -n kube-systemNAME READY STATUS RESTARTS AGEpod/calico-kube-controllers-7bc46c76c-7m6hf 1/1 Running 0 5m26spod/calico-node-6wx96 1/1 Running 0 5m26spod/coredns-78fcd69978-hflvf 1/1 Running 0 7m21spod/coredns-78fcd69978-r8fmp 1/1 Running 0 7m21spod/etcd-secondcluster-control-plane 1/1 Running 0 7m36spod/kube-apiserver-secondcluster-control-plane 1/1 Running 0 7m36spod/kube-controller-manager-secondcluster-control-plane 1/1 Running 0 7m37spod/kube-proxy-ctwnz 1/1 Running 0 7m21spod/kube-scheduler-secondcluster-control-plane 1/1 Running 0 7m35sNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEservice/kube-dns ClusterIP 10.96.0.10 <none> 53/UDP,53/TCP,9153/TCP 7m36sNAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGEdaemonset.apps/calico-node 1 1 1 1 1 kubernetes.io/os=linux 5m26sdaemonset.apps/kube-proxy 1 1 1 1 1 kubernetes.io/os=linux 7m36sNAME READY UP-TO-DATE AVAILABLE AGEdeployment.apps/calico-kube-controllers 1/1 1 1 5m26sdeployment.apps/coredns 2/2 2 2 7m36sNAME DESIRED CURRENT READY AGEreplicaset.apps/calico-kube-controllers-7bc46c76c 1 1 1 5m26sreplicaset.apps/coredns-78fcd69978 2 2 2 7m21s
Now let's create a deployment to see how it works,
kubectl create deployment nginxdeployment1 --image=nginx --replicas=3~/tce-darwin-amd64-v0.11.0 kubectl get deployNAME READY UP-TO-DATE AVAILABLE AGEnginxdeployment1 3/3 3 3 24m
Cool!
I am going to be playing around more with TCE now instead of KinD to see how this goes.