[ kubesphere安装 ]


官网

一. 安装

debain系统, 所有k8s安装到一台主机上

1.1 ssh

注意需要配置允许root用户连接

1.2 安装依赖

apt-get install socat

apt-get install conntrack

apt-get install ebtables

apt-get install ipset

1.3 下载

如果您访问 GitHub/Googleapis 受限

设置时区

export KKZONE=cn

下载

curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.7 sh -

如果网络正常能连git则正常下载

curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.7 sh -

1.4查看是否安装成功

#####################################################

###              Welcome to KubeSphere!           ###

#####################################################



Console: http://192.168.0.2:30880

Account: admin

Password: P@88w0rd



NOTES:

  1. After you log into the console, please check the

     monitoring status of service components in

     "Cluster Management". If any service is not

     ready, please wait patiently until all components 

     are up and running.

  2. Please change the default password after login.



#####################################################

https://kubesphere.io             20xx-xx-xx xx:xx:xx

#####################################################

1.5 开启热插拔devops

  1. 以 admin 用户登录控制台,点击左上角的平台管理,选择集群管理。

  2. 点击定制资源定义,在搜索栏中输入 clusterconfiguration,点击搜索结果查看其详细页面。

  3. 定制资源定义(CRD)允许用户在不新增 API 服务器的情况下创建一种新的资源类型,用户可以像使用其他 Kubernetes 原生对象一样使用这些定制资源。在自定义资源中,点击 ks-installer 右侧的 ,选择编辑 YAML。在该 YAML 文件中,搜索 devops,将 enabled 的 false 改为 true。完成后,点击右下角的确定,保存配置。

devops:
  enabled: true # 将“false”更改为“true”。

在 kubectl 中执行以下命令检查安装过程:

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