kubesphere 安装完成后会创建默认账户admin/P@88w0rd,待ks-controller-manager启动就绪,user controller 会将 user CRD中定义的password加密,user会被转换为active状态,至此账户才可以正常登录。
当安装完成后遇到默认账户无法登录,看到account is not active相关错误提示时,需要检查ks-controller-manager的运行状态和日志。常见问题及解决方式如下:
K8s 1.19兼容性
kubesphere 3.0.0 并未在1.19上进行完整的测试,目前支持的K8s 版本 1.15.5+, 1.16.2+, 1.17, 1.18
相关错误日志
x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0, requeuing
注意1.19未经过充分测试,可以通过一下命令解决证书问题
kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/2c4b479ec65110f7910f913734b3d069409d72a8/roles/ks-core/prepare/files/ks-init/users.iam.kubesphere.io.yaml
kubectl apply -f https://raw.githubusercontent.com/kubesphere/ks-installer/2c4b479ec65110f7910f913734b3d069409d72a8/roles/ks-core/prepare/files/ks-init/webhook-secret.yaml
kubectl -n kubesphere-system rollout restart deploy ks-controller-manager
https://github.com/kubesphere/kubesphere/issues/2928
存储、网络问题
user controller 依赖的外部服务有openldap和jenkins,在依赖服务不正常的情况下controller会一直reconcile,user CRD状态无法正常维护,导致账户无法登录。
可以通过 ks-controller-manager 日志和pod运行状态定位到问题。
常见问题: 存储配置错误、数据丢失、集群网络不通。
https://kubesphere.com.cn/forum/d/2058-kk-internal-error-occurred-account-is-not-active/8
https://kubesphere.com.cn/forum/d/2202-kubesphere-v3-0-0-admin/25