安装 kubesphere 插件报错Error: UPGRADE FAILED: \“ks-minio\“ has no deployed releases

安装 kubesphere 插件报错Error: UPGRADE FAILED: “ks-minio” has no deployed releases

TASK [common : Kubesphere | Creating manifests] ********************************
ok: [localhost] => (item={
   
   u'name': u'custom-values-minio', u'file': u'custom-values-minio.yaml'})

TASK [common : Kubesphere | Check minio] ***************************************
changed: [localhost]

TASK [common : Kubesphere | Deploy minio] **************************************
fatal: [localhost]: FAILED! => {
   
   "changed": true, "cmd": "/usr/local/bin/helm upgrade --install ks-minio /etc/kubesphere/minio-ha -f /etc/kubesphere/custom-values-minio.yaml --set fullnameOverride=minio --namespace kubesphere-system --wait --timeout 1800\n", "delta": "0:00:00.283695", "end": "2024-03-29 02:47:43.891112", "msg": "non-zero return code", "rc": 1, "start": "2024-03-29 02:47:43.607417", "stderr": "Error: UPGRADE FAILED: \"ks-minio\" has no deployed releases", "stderr_lines": ["Error: UPGRADE FAILED: \"ks-minio\" has no deployed releases"], "stdout": "", "stdout_lines": []}
...ignoring

TASK [common : debug] **********************************************************
ok: [localhost] => {
   
   
    "msg": [
        "1. check the storage configuration and storage server", 
        "2. make sure the DNS address in /etc/resolv.conf is available.", 
        "3. execute 'helm del --purge ks-minio && kubectl delete job -n kubesphere-system ks-minio-make-bucket-job'", 
        "4. Restart the installer pod in kubesphere-system namespace"
    ]
}

TASK [common : fail] ***********************************************************
fatal: [localhost]: FAILED! => {
   
   "changed": false, "msg": "It is suggested to refer to the above methods for troubleshooting problems ."}

PLAY RECAP *********************************************************************
localhost                  : ok=35   changed=20   unreachable=0    failed=1    skipped=73   rescued=0    ignored=4

解决方案:
将 calio 更改为 flannel ,参考这篇 Kubesphere 社区帖子
在这里插入图片描述


将 Calico 替换为 Flannel 需要执行以下步骤:

1、准备工作:
确保你有管理员权限,并且能够访问 Kubernetes 集群。

2、备份当前网络配置:
在执行任何更改之前,务必备份当前的网络配置,以防止意外情况。

3、停止 Calico:
如果你的集群中正在运行 Calico,首先需要停止它。你可以使用以下命令删除 Calico:

kubectl delete -f <calico_manifest.yaml>

替换 <calico_manifest.yaml> 为你之前用于安装 Calico 的 YAML 文件。

4、安装 Flannel:
首先,确保你已经安装了 Flannel 的 YAML 文件。你可以从 Flannel 的 GitHub 仓库中获取这些文件。

下载 Flannel 的 YAML 文件:

wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

被墙了的话可以从这里复制:

---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: psp.flannel.unprivileged
  annotations:
    seccomp.security.alpha.kubernetes.io/allowedProfileNames: docker/default
    seccomp.security.alpha.kubernetes.io/defaultProfileName: docker/default
    apparmor.security.beta.kubernetes.io/allowedProfileNames: runtime/default
    apparmor.security.beta.kubernetes.io/defaultProfileName: runtime/default
spec:
  privileged: false
  volumes:
    - configMap
    - secret
    - emptyDir
    - hostPath
  allowedHostPaths:
    - pathPrefix: "/etc/cni/net.d"
    - pathPrefix: "/etc/kube-flannel"
    - pathPrefix: "/run/flannel"
  readOnlyRootFilesystem: false
  # Users and groups
  runAsUser:
    rule: RunAsAny
  supplementalGroups:
    rule: RunAsAny
  fsGroup:
    rule: RunAsAny
  # Privilege Escalation
  allowPrivilegeEscalation: false
  defaultAllowPrivilegeEscalation: false
  # Capabilities
  allowedCapabilities: ['NET_ADMIN']
  defaultAddCapabilities: []
  requiredDropCapabilities: []
  # Host namespaces
  hostPID: false
  hostIPC: false
  hostNetwork: true
  hostPorts:
  - min: 0
    max: 65535
  # SELinux
  seLinux:
    # SELinux is unused in CaaSP
    rule: 'RunAsAny'
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: flannel
rules:
  - apiGroups: ['extensions']
    resources: ['podsecuritypolicies']
    verbs: ['use']
    resourceNames: ['psp.flannel.unprivileged']
  - apiGroups:
      - ""
    resources:
      - pods
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值