介绍搭建 k8s 管理工具
1. Dashboard
Dashboard感觉不太好用,还是kubesphere好用。
下载yaml文件
wget https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
部署
kubectl apply -f recommended.yaml
访问地址
https://IP:nodePort
2. kubesphere
安装
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.0/kubesphere-installer.yaml
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.0/cluster-configuration.yaml
安装日志
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f
查看pod
kubectl get pod --all-namespaces | grep kubesphere
查看控制台是否启动
kubectl get svc/ks-console -n kubesphere-system
[root@k8s-master kubesphere]# kubectl get svc/ks-console -n kubesphere-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ks-console NodePort 10.108.118.115 <none> 80:30880/TCP 59d
[root@k8s-master kubesphere]#
访问
http://IP:30880