VMware Tanzu Community Edition 部署非托管集群
Posted wuweijava
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VMware Tanzu Community Edition 部署非托管集群相关的知识,希望对你有一定的参考价值。
VMware Tanzu Community Edition 是一个功能齐全,易于管理的Kubernetes平台,供学习者和用户使用。它是一个免费的、社区支持的、开源的VMware Tanzu 发行版,可以在几分钟内在您的本地工作站上或您喜欢的云上安装和配置。
1. 安装Docker
1.1 修改安装源
文件 /etc/apt/sources.list 改为以下内容
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
1.2 更新系统
# apt update -y && apt upgrade -y
1.3 安装软件包
# apt-get install -y ca-certificates curl gpg lsb-release sudo
1.4 卸载旧的docker
# apt-get remove docker docker-engine docker.io containerd runc
1.5 安装GPG秘钥
# curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg`
1.6 添加docker安装源
# echo \\
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \\
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
1.7 更新安装源
# apt-get update
1.8 安装docker
# apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
1.9 添加阿里云加速器
# mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-EOF
"registry-mirrors": [
"https://lsf7d76k.mirror.aliyuncs.com"
]
EOF
1.10 重启docker服务
# systemctl daemon-reload
# systemctl restart docker
2. 安装Kubectl
# curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
# sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
3. 安装Tanzu CLI
3.1 下载安装包
https://github.com/vmware-tanzu/community-edition/releases
3.2 解压缩安装包
# tar xvf tce-linux-amd64-v0.12.0.tar.gz
# cd tce-linux-amd64-v0.12.0/
3.4 修改 install.sh
,注释下面内容
安装脚本建议不要以root运行docker,此处注释跳过了该项检查,请根据实际需要操作
#ALLOW_INSTALL_AS_ROOT="$ALLOW_INSTALL_AS_ROOT:-"""
#if [[ "$EUID" -eq 0 && "$ALLOW_INSTALL_AS_ROOT" != "true" ]]; then
# error_exit "Do not run this script as root"
#fi
3.5 安装Tanzu CLI
# ./install.sh
+ set +x
====================================
Installing Tanzu Community Edition
====================================
Installing tanzu cli to /usr/local/bin/tanzu
Checking for required plugins...
Installing plugin apps:v0.6.0
Installing plugin builder:v0.11.4
Installing plugin cluster:v0.11.4
Installing plugin codegen:v0.11.4
Installing plugin conformance:v0.12.0
Installing plugin diagnostics:v0.12.0
Installing plugin kubernetes-release:v0.11.4
Installing plugin login:v0.11.4
Installing plugin management-cluster:v0.11.4
Installing plugin package:v0.11.4
Installing plugin pinniped-auth:v0.11.4
Installing plugin secret:v0.11.4
Installing plugin unmanaged-cluster:v0.12.0
Successfully installed all required plugins
✔ successfully initialized CLI
Installation complete!
4. 部署非托管集群
4.1 部署名为 ww
的托管集群
# tanzu unmanaged-cluster create ww
以上是关于VMware Tanzu Community Edition 部署非托管集群的主要内容,如果未能解决你的问题,请参考以下文章
开始使用 VMware Tanzu Mission Control 和 Tanzu Kubernetes Grid
VMware Tanzu已融合云原生与K8s 市场前景尚不确定
VMware Tanzu已融合云原生与K8s 市场前景尚不确定