VMware Tanzu社区版初体验 (2)

2、现在可以打开链接,通过浏览器安装配置集群了

VMware Tanzu社区版初体验

3、首先我们部署一个管理集群到docker环境

VMware Tanzu社区版初体验


VMware Tanzu社区版初体验


VMware Tanzu社区版初体验


VMware Tanzu社区版初体验


4、最后点击部署,即可开始创建一个管理集群,也可以用最底下的命令行执行

VMware Tanzu社区版初体验


VMware Tanzu社区版初体验


5、等待部署完成,验证管理集群是否正常

linux-mint-002@linux-mint-002:~/tanzu$ tanzu management-cluster get NAME NAMESPACE STATUS CONTROLPLANE WORKERS KUBERNETES ROLES tanzu tkg-system running 1/1 1/1 v1.21.2+vmware.1 management Details: NAME READY SEVERITY REASON SINCE MESSAGE /tanzu True 6d23h ├─ClusterInfrastructure - DockerCluster/tanzu True 6d23h ├─ControlPlane - KubeadmControlPlane/tanzu-control-plane True 6d23h │ └─Machine/tanzu-control-plane-v9jxw True 6d23h └─Workers └─MachineDeployment/tanzu-md-0 └─Machine/tanzu-md-0-567d7cf787-wkphp True 6d23h Providers: NAMESPACE NAME TYPE PROVIDERNAME VERSION WATCHNAMESPACE capd-system infrastructure-docker InfrastructureProvider docker v0.3.23 capi-kubeadm-bootstrap-system bootstrap-kubeadm BootstrapProvider kubeadm v0.3.23 capi-kubeadm-control-plane-system control-plane-kubeadm ControlPlaneProvider kubeadm v0.3.23 capi-system cluster-api CoreProvider cluster-api v0.3.23

6、获取管理集群的kubeconfig

linux-mint-002@linux-mint-002:~/tanzu$ tanzu management-cluster kubeconfig get tanzu --admin

然后就可以执行kubectl操作管理集群了

linux-mint-002@linux-mint-002:~/tanzu$ kubectl get no NAME STATUS ROLES AGE VERSION tanzu-control-plane-v9jxw Ready control-plane,master 6d23h v1.21.2+vmware.1-360497810732255795 tanzu-md-0-567d7cf787-wkphp Ready <none> 6d23h v1.21.2+vmware.1-360497810732255795

7、创建工作负载集群

linux-mint-002@linux-mint-002:~/tanzu$ tanzu cluster create tkg-workload --plan dev linux-mint-002@linux-mint-002:~/tanzu$ tanzu cluster list NAME NAMESPACE STATUS CONTROLPLANE WORKERS KUBERNETES ROLES PLAN tkg-workload default running 1/1 1/1 v1.21.2+vmware.1 <none> dev

8、获取工作集群的kubeconfig,并查看集群信心

linux-mint-002@linux-mint-002:~/tanzu$ tanzu cluster kubeconfig get tkg-workload --admin linux-mint-002@linux-mint-002:~/tanzu$ kubectl config get-contexts CURRENT NAME CLUSTER AUTHINFO NAMESPACE * tanzu-admin@tanzu tanzu tanzu-admin tkg-workload-admin@tkg-workload tkg-workload tkg-workload-admin 切换kubecontext linux-mint-002@linux-mint-002:~/tanzu$ kubectl config use-context tkg-workload-admin@tkg-workload Switched to context "tkg-workload-admin@tkg-workload". linux-mint-002@linux-mint-002:~/tanzu$ kubectl get no NAME STATUS ROLES AGE VERSION tkg-workload-control-plane-nbddz Ready control-plane,master 6d2h v1.21.2+vmware.1-360497810732255795 tkg-workload-md-0-c7bc5dc9f-zwjfg Ready <none> 6d2h v1.21.2+vmware.1-360497810732255795 linux-mint-002@linux-mint-002:~/tanzu$ kubectl get po --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system antrea-agent-xwrk6 2/2 Running 1 6d2h kube-system antrea-agent-zl6gq 2/2 Running 0 6d2h kube-system antrea-controller-89547f7f5-tgn7z 1/1 Running 0 6d2h kube-system coredns-8dcb5c56b-lbcqw 1/1 Running 0 6d2h kube-system coredns-8dcb5c56b-wvzjw 1/1 Running 0 6d2h kube-system etcd-tkg-workload-control-plane-nbddz 1/1 Running 0 6d2h kube-system kube-apiserver-tkg-workload-control-plane-nbddz 1/1 Running 0 6d2h kube-system kube-controller-manager-tkg-workload-control-plane-nbddz 1/1 Running 0 6d2h kube-system kube-proxy-226wj 1/1 Running 0 6d2h kube-system kube-proxy-hwq2q 1/1 Running 0 6d2h kube-system kube-scheduler-tkg-workload-control-plane-nbddz 1/1 Running 0 6d2h kube-system metrics-server-b9698ff4-rhrw5 1/1 Running 0 6d2h projectcontour contour-c48db6f9f-dmcfb 1/1 Running 0 6d2h projectcontour contour-c48db6f9f-zwszk 1/1 Running 0 6d2h projectcontour contour-certgen-v1.18.1-zfcwr 0/1 Completed 0 6d2h projectcontour envoy-n6pld 2/2 Running 0 6d2h tkg-system kapp-controller-74bcf9f866-9f6th 1/1 Running 0 6d2h tkg-system tanzu-capabilities-controller-manager-6ff97656b8-bbhs6 1/1 Running 0 6d2h

以上,为tanzu社区版的安装,更多信息参见官方文档

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzfpgf.html