Deploying Tanzu TCE Unmanaged Cluster using Docker

Lubomir Tobek
3 min readNov 22, 2023

--

Warning:
The Tanzu Community Edition open source project was retired Dec 2022. Tanzu Community Edition GitHub project will have all Tanzu Community Edition-specific code (not open source packages from other projects) removed, and the Tanzu Community Edition Slack channel will be archived. Users can download Tanzu Kubernetes Grid here.

This article will show you how to deploy an unmanaged cluster. Unmanaged clusters are the first step to getting into Tanzu. Deploy a basic Kubernetes cluster in Docker on your local machine. You can then interact with it as you would any workload cluster. You can install packages, configure authentication, etc.

The procedure is straightforward, and we can deploy it locally in a virtual machine for training.

I used the following:

  • Ubuntu 22.04.3, 4 vCPU, 6 GB RAM, 40 GB HDD, vNIC (NAT)

Of course, I used VMware Fusion for the guest environment. You can use whatever you have available; of course, it’s a virtual machine environment, a Linux instance, and an internet connection.

“Tanzu Community Edition is a full-featured, easy to manage Kubernetes platform for learners and users. It’s available for free”, Source of an image: tanzucommunityedition.io

In Ubuntu I used the following commands:

tce@tce-virtual-machine:~$ dpkg -l | grep docker
tce@tce-virtual-machine:~$ dpkg -l | grep curl
tce@tce-virtual-machine:~$ sudo apt install curl
tce@tce-virtual-machine:~$ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

tce@tce-virtual-machine:~$ echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

tce@tce-virtual-machine:~$ sudo apt-get update
tce@tce-virtual-machine:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io
tce@tce-virtual-machine:~$ sudo docker run hello-world
tce@tce-virtual-machine:~$ sudo groupadd docker
tce@tce-virtual-machine:~$ sudo usermod -aG docker $USER
tce@tce-virtual-machine:~$ sudo systemctl enable docker.service
tce@tce-virtual-machine:~$ sudo systemctl enable containerd.service
tce@tce-virtual-machine:~$ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
tce@tce-virtual-machine:~$ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
tce@tce-virtual-machine:~$ kubectl version --client
tce@tce-virtual-machine:~$ sudo docker info | grep -i cgroup
tce@tce-virtual-machine:~$ sudo vi /etc/default/grub
#GRUB_CMDLINE_LINUX= add -> "systemd.unified_cgroup_hierarchy=0"
tce@tce-virtual-machine:~$ sudo grub-mkconfig -o /boot/grub/grub.cfg
tce@tce-virtual-machine:~$ sudo reboot
tce@tce-virtual-machine:~$ sudo systemctl status docker
tce@tce-virtual-machine:~$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
tce@tce-virtual-machine:~$ eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
tce@tce-virtual-machine:~$ sudo apt-get install build-essential
tce@tce-virtual-machine:~$ brew tap vmware-tanzu/tanzu
tce@tce-virtual-machine:~$ brew install tanzu-community-edition
tce@tce-virtual-machine:~$ cd /home/linuxbrew/.linuxbrew/Cellar/tanzu-community-edition/v0.12.1/libexec/
tce@tce-virtual-machine:~$ ./configure-tce.sh
tce@tce-virtual-machine:~$ tanzu version
tce@tce-virtual-machine:~$ tanzu unmanaged-cluster --help
tce@tce-virtual-machine:~$ tanzu unmanaged-cluster create tce-umng-cl
tce@tce-virtual-machine:~$ kubectl get pods -A
tce@tce-virtual-machine:~$ kubectl get ns -A
tce@tce-virtual-machine:~$ kubectl get all
tce@tce-virtual-machine:~$ kubectl get nodes
tce@tce-virtual-machine:~$ kubectl config get-contexts
tce@tce-virtual-machine:~$ tanzu unmanaged-cluster list

The installation went well, and here is a small preview:

For a small test, we will create a mini nginx deployment with three replicas:

tce@tce-virtual-machine:~$ kubectl create deployment nginxdeployment --image=nginx --replicas=3
tce@tce-virtual-machine:~$ kubectl get deploy

Tanzu Community Edition (TCE) is a great way to play around with Kubernetes and use the same enterprise solution in Tanzu Kubernetes that your organization may be operating in production. With Tanzu Community Edition Released with Unmanaged Cluster Configuration, the deployment is even more efficient and easy with minimal resources required.

--

--