在 kubesphere 上搭建 cube studio - tencentmusic/cube-studio GitHub Wiki

初始化机器环境

# 安装基础依赖
apt install -y socat conntrack ebtables ipset
# 关闭firewalld服务
systemctl stop firewalld
systemctl disable firewalld
# 禁用iptable
systemctl stop iptables
systemctl disable iptables
# 禁用selinux
setenforce 1
echo "SELINUX=disabled" > /etc/selinux/config
#临时关闭swap分区
swapoff -a

搭建 k8s+kubesphere

注意:机器最低规格为:8C16G ;kubectl 版本要1.24 ;之前安装过 KS 要提前清理下环境。

  • 下载 KubeKey
export KKZONE=cn
curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.13 sh -
chmod +x kk
  • 清理 kubeconfig,不然会导致其他 node 节点 无法使用 kubectl
rm -rf  /root/.kube/config
  • 安装 1.21 版本的 k8s

自定义部署最好不要启用servicemesh和monitoring

./kk create cluster --with-kubernetes v1.21.10  --with-kubesphere v3.4.1

详细安装步骤可以参考 KubeSphere 官方文档

默认账号密码:admin/P@88w0rd

部署cube-studio

将k8s集群的kubeconfig文件复制到install/kubernetes/config文件中,其中xx.xx.xx.xx为机器内网的ip(不是外网ip)

# 在k8s worker机器上执行
sh start-with-kubesphere.sh xx.xx.xx.xx

配置prometheus替换为kubesphere的

grafana中数据源地址替换为http://prometheus-k8s.kubesphere-monitoring-system.svc:9090

配置文件config.py中

PROMETHEUS 修改为 prometheus-k8s.kubesphere-monitoring-system:9090

卸载 KubeSphere 和 Kubernetes

./kk delete cluster