vNoob 09月29日
Tanzu Homelab配置详解
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了在Tanzu Homelab中配置Namespace、权限、存储以及部署VM Class和Content Library的步骤。首先,在Workload Management页面创建Namespace,并赋予相应权限。接着,添加存储策略和VM Class,以定义可部署的虚拟机大小。最后,通过下载CLI插件并配置PATH,成功连接到Tanzu集群,为后续部署资源和工作负载奠定了基础。

💡 配置Namespace:在Workload Management页面创建Namespace,并赋予相应权限,如owner权限,以确保有足够的操作能力。

📁 添加存储:选择之前创建的存储策略,为Namespace配置存储,以便后续工作负载使用。

🖥️ 设置VM Class:定义可部署的虚拟机大小,例如选择best-effort-xsmall,以满足实验环境的需求。

📚 配置Content Library:选择合适的Content Library,为VM Class提供基础镜像和应用程序,方便快速部署。

🔗 连接Tanzu集群:下载并配置CLI插件,确保能够通过命令行访问Tanzu集群,为自动化部署做准备。

In the last post, we got Tanzu configured, however, before we can get any services deployed there are a few more items we need set up.

The first is getting a Namespace setup, followed by permissions and storage. Fortunately, all of these items are pretty quick to configure.

From the Workload Management page, go to Namespaces and click Create Namespace.

Choose a name for the namespace and select the network.

Done! That was quick. Now on the namespace page, we need to choose Add Permissions.

I used the devops@vsphere.local account I setup earlier. Because this is a homelab, I went ahead and gave it owner permissions.

Now we need to Add Storage.

Select the policy you previously created.

The last thing we want to do is add a VM Class and Content Library. These are in the VM Service block/widget.

When we add a VM Class we are basically telling Tanzu what size of VMs it is able to deploy. For my lab, I want it to deploy the smallest possible, so best-effort-xsmall for me.

After selecting VM Class let’s choose a content library.

That’s it. Although we could have done this before now, let’s make sure we can access the supervisors.

From the Supervisor page you will see a Control Plane node address. This is actually one of the HAProxy VIPs fronting for the control nodes. Anyway, lets hit that IP in a browser.

Looks good. Download the CLI plug for your OS of choice.

Next, we need to extract the content of the zip into our PATH. To check your path on Windows, simply type path in a command prompt. You should see something like this.

PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\

You can extract the contents to any of those folders, or potentially add a new folder to your PATH. I just extracted it to an existing folder.

Once that is done you should be able to connect to you supervisor cluster.

Great! Now we are connected to Tanzu so we should be able to easily deploy some resources/workloads

Unfortunately, after getting vSphere with Tanzu deployed, it seems we still cannot deploy pods or any resources. The reason for this is the vSphere with Tanzu deployment is deploying a Tanzu/K8s management cluster. Being a management cluster, it won’t let us deploy workloads. Yes, a bit annoying.

We have two options, the first option is we now deploy and Tanzu Kubernetes Cluster to our vSphere with Tanzu. This would create a workload Tanzu cluster where we would be able to deploy pods/services.

The second option is to use William Lam’s workaround in order to allow to deploy to the existing Tanzu cluster we just deployed.

In the spirit of trying to do things “by the book”, I tried to get TKC deployed. For some reason I have not yet figured out, it would never deploy for me. In the midst of this over several weeks I had some storms and power outages. After each outage, I could not get Tanzu back into a healthy place and ended up needing to start over.

At the end of the day and because of my frustration, I landed on using William Lam’s method to get resources deployed.

After stepping through William Lam’s post, I was able to get a small nginx deployment stood up.

Woohoo! If you have stuck with me through all these posts, WOW! Thank You! Hopefully, you were also able to get everything working. Now you should be able to deploy services to Tanzu! Have Fun!

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Tanzu Homelab Namespace 权限配置 存储策略 VM Class Content Library CLI插件
相关文章