创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
发帖前请点击 发表主题 右边的 预览(👀) 按钮,确保帖子格式正确。
操作系统信息
虚拟机,Centos7.9,4C/16G
Kubernetes版本信息
v1.28.15 3节点 高可用安装
容器运行时
containerd 1.7.13
KubeSphere版本信息
v4.1.2 离线安装 高可用安装
kubekey 版本
v3.1.7
问题:离线部署好k8s集群,后在高可用部署kubesphere 4.1.2的时候ks-apiserver时报错
config-sample.yaml配置文件 :internalLoadbalancer: haproxy
开启
apiVersion: kubekey.kubesphere.io/v1alpha2
kind: Cluster
metadata:
name: sample
spec:
hosts:
- {name: 192-168-11-84, address: 192.168.11.84, internalAddress: 192.168.11.84, user: root, password: "Testing@123"}
- {name: 192-168-11-85, address: 192.168.11.85, internalAddress: 192.168.11.85, user: root, password: "Testing@123"}
- {name: 192-168-11-86, address: 192.168.11.86, internalAddress: 192.168.11.86, user: root, password: "Testing@123"}
- {name: 192-168-11-88, address: 192.168.11.88, internalAddress: 192.168.11.88, user: root, password: "Testing@123"}
roleGroups:
etcd:
- 192-168-11-84
- 192-168-11-85
- 192-168-11-86
control-plane:
- 192-168-11-84
- 192-168-11-85
- 192-168-11-86
worker:
- 192-168-11-84
- 192-168-11-85
- 192-168-11-86
registry:
- 192-168-11-88
controlPlaneEndpoint:
## Internal loadbalancer for apiservers
internalLoadbalancer: haproxy
domain: lb.kubesphere.local
address: ""
port: 6443
kubernetes:
version: v1.28.15
clusterName: cluster.local
autoRenewCerts: true
containerManager: containerd
etcd:
type: kubekey
network:
plugin: calico
kubePodsCIDR: 10.233.64.0/18
kubeServiceCIDR: 10.233.0.0/18
## multus support. https://github.com/k8snetworkplumbingwg/multus-cni
multusCNI:
enabled: false
registry:
type: harbor
auths:
"dockerhub.kubekey.local":
username: admin
password: Harbor12345
skipTLSVerify: true
privateRegistry: "dockerhub.kubekey.local"
namespaceOverride: "kubesphereio"
registryMirrors: []
insecureRegistries: []
addons: []
离线部署k8s代码:./kk create cluster -f config-sample.yaml -a kubesphere.tar.gz --with-local-storage
离线部署k8s状态: 成功
离线部署kubesphere代码:
如需高可用部署 KubeSphere,可在命令中添加 --set ha.enabled=true,redisHA.enabled=true
只要添加了 --set ha.enabled=true,redisHA.enabled=true
就会报错,去掉的话部署成功
helm upgrade --install -n kubesphere-system --create-namespace ks-core ks-core-1.1.3.tgz \
--set global.imageRegistry=dockerhub.kubekey.local/ks \
--set extension.imageRegistry=dockerhub.kubekey.local/ks \
--set ksExtensionRepository.image.tag=v1.1.2 \
--debug \
--wait \
--set ha.enabled=true,redisHA.enabled=true
离线部署kubesphere状态:报错,
错误截图如下: