最小化安装kubesphere
版本:
-
KubeSphere 3.3
-
kubernetes 1.22.10
链接:
- https://v2-1.docs.kubesphere.io/docs/zh-cn/installation/install-on-k8s
- https://github.com/kubesphere/kubesphere
1. 准备工作
-
kubectl version
kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.10", GitCommit:"eae22ba6238096f5dec1ceb62766e97783f0ba2f", GitTreeState:"clean", BuildDate:"2022-05-24T12:56:35Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.10", GitCommit:"eae22ba6238096f5dec1ceb62766e97783f0ba2f", GitTreeState:"clean", BuildDate:"2022-05-24T12:50:52Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
$ free -g
total used free shared buff/cache available
Mem: 16 4 10 0 3 2
Swap: 0 0 0
-
默认
kubectl get sc
NAME PROISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
nfs-storage (default) k8s-sigs.io/nfs-subdir-external-provisioner Delete Immediate false 30d
注:使用nfs方式存储。
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/kubesphere-installer.yaml
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/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
Collecting installation results ...
#####################################################
### Welcome to KubeSphere! ###
#####################################################
Console: http://192.168.80.45: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 2023-01-18 00:27:10
#####################################################
-
使用
kubectl get pod --all-namespaces
kubectl get svc/ks-console -n kubesphere-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ks-console NodePort 10.105.105.226 <none> 80:30880/TCP 71m
3.1 在 Kubernetes 上安装
mkdir -p /root/kubesphere && cd /root/kubesphere
wget https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/cluster-configuration.yaml
vim cluster-configuration.yaml
# 在 cluster-configuration.yaml 文件中,搜索 openpitrix,并将 enabled 的 false 改为 true。完成后保存文件
openpitrix:
store:
enabled: true # 将“false”更改为“true”。
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/kubesphere-installer.yaml
kubectl apply -f cluster-configuration.yaml
http://192.168.80.45:30880/apps
-
admin
用户登录控制台,点击左上角的平台管理,选择集群管理。 -
点击定制资源定义,在搜索栏中输入
clusterconfiguration
,点击结果查看其详细页面。 -
在自定义资源中,点击
ks-installer
右侧的,选择编辑 YAML。
-
在该 YAML 文件中,搜索
openpitrix
,将enabled
的false
改为true
。完成后,点击右下角的确定
openpitrix:
store:
enabled: true # 将“false”更改为“true”。
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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!