在执行kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.1.0/kubesphere-installer.yaml时报以下日志:

customresourcedefinition.apiextensions.k8s.io/clusterconfigurations.installer.kubesphere.io unchanged
namespace/kubesphere-system unchanged
serviceaccount/ks-installer unchanged
clusterrole.rbac.authorization.k8s.io/ks-installer unchanged
clusterrolebinding.rbac.authorization.k8s.io/ks-installer unchanged
deployment.apps/ks-installer unchanged

日志的意思是没有改变,都安装过了,但我没有安装成功过,或者说我的pod没有运行成功,我的解决办法是:

把kubesphere-installer.yaml中定义的组件都强制卸载掉:

 kubectl  delete Namespace kubesphere-system --force --grace-period=0

kubectl  delete CustomResourceDefinition clusterconfigurations.installer.kubesphere.io --force --grace-period=0

kubectl  delete ServiceAccount ks-installer --force --grace-period=0

kubectl  delete ClusterRole ks-installer --force --grace-period=0

kubectl  delete ClusterRoleBinding ks-installer --force --grace-period=0

kubectl  delete Deployment ks-installer --force --grace-period=0

然后再执行:

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.1.0/kubesphere-installer.yaml
   
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.1.0/cluster-configuration.yaml
会发现安装成功。

这个时候可以查看pod

kubectl -n kubesphere-system get pod

查看pod状态,如果运行不成功则查看日志,解决后续问题。

 

 

Logo

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

更多推荐