一、定制化安装

KubeSphere 在 2.1 版本的 Installer 对各功能组件进行了 解耦,快速安装将默认仅开启最小化安装(Minimal Installation),支持在安装前或安装后 自定义可插拔的功能组件的安装,使最小化安装 更快速轻量且资源占用更少,也方便不同用户 按需选择安装不同的功能组件。

自定义安装可插拔的功能组件

Installer 支持在 KubeSphere 安装前和安装后单独安装可选的功能组件,您可以根据 业务需求和机器配置,选择安装所需的功能组件,体验 KubeSphere 完整的端到端的容器产品解决方案,并且 所有组件都是开源免费的。

开启安装 DevOps 系统

通过修改 ks-installer 的 configmap 可以选装组件,执行以下命令(kubectl 命令需要以 root 用户执行)。

$ kubectl edit cm -n kubesphere-system ks-installer

开启 devops,消息通知,报警通知等插件。

...

devops:

enabled: True

jenkinsMemoryLim: 2Gi

jenkinsMemoryReq: 1000Mi

jenkinsVolumeSize: 8Gi

jenkinsJavaOpts_Xms: 512m

jenkinsJavaOpts_Xmx: 512m

jenkinsJavaOpts_MaxRAM: 2g

sonarqube:

enabled: True

postgresqlVolumeSize: 8Gi

servicemesh:

enabled: false

notification:

enabled: True

alerting:

enabled: True

kind: ConfigMap

保存退出,参考 验证可插拔功能组件的安装 ,无需再次执行安装命令 ./install.sh,仅需通过查询 ks-installer 日志或 Pod 状态即可验证功能组件是否安装成功。

查看安装日志:

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f

日志打印记录:

PLAY RECAP *********************************************************************

localhost : ok=36 changed=26 unreachable=0 failed=0 skipped=12 rescued=0 ig

nored=0

Start installing notification

Start installing monitoring

Start installing devops

Start installing alerting

**************************************************

task notification status is successful

task alerting status is successful

total: 4 completed:2

**************************************************

...

**************************************************

task notification status is successful

task monitoring status is successful

task alerting status is successful

total: 4 completed:3

**************************************************

task notification status is successful

task monitoring status is successful

task devops status is successful

task alerting status is successful

total: 4 completed:4

**************************************************

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

### Welcome to KubeSphere! ###

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

Console: http://192.168.0.2:30880

Account: admin

Password: P@88w0rd

NOTES:

1. After logging into the console, please check the

monitoring status of service components in

the "Cluster Status". If the service is not

ready, please wait patiently. You can start

to use when all components are ready.

2. Please modify the default password after login.

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

可以看到,notification,monitoring,devops,alerting 插件已经安装好了。

kubesphere还有一个激动人心得功能,那就是可以在页面直接进入终端:

界面还是非常的漂亮:

当然了,上边的终端工具🔨只有admin用户才可以操作。

二、建立多租户系统

本文档面向初次使用 KubeSphere 的集群管理员用户,引导新手用户创建企业空间、创建新的角色和账户,然后邀请新用户进入企业空间后,创建项目和 DevOps 工程,帮助用户熟悉多租户下的用户和角色管理,快速上手 KubeSphere。

目前,平台的资源一共有三个层级,包括 集群 (Cluster)、 企业空间 (Workspace)、 项目 (Project) 和 DevOps Project (DevOps 工程),层级关系如下图所示,即一个集群中可以创建多个企业空间,而每个企业空间,可以创建多个项目和 DevOps工程,而集群、企业空间、项目和 DevOps工程中,默认有多个不同的内置角色。

建立项目成员:

建立平台角色:

项目成员:

为者常成,行者常至

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐