hrlc

最新的Kubernetes 1.26版本安装Kubernetes v3.3.2? 基于最新的Kubernetes版本社区还未进行过部署验证,你是一个勇于吃螃蟹的!

从日志的报错看 no matches for kind \\"PodDisruptionBudget\\" in version \\"policy/v1beta1\\"" 应该是kuberentes API 升级,导致部署失败,欢迎到 https://github.com/kubesphere/kubesphere/issues 提交这个的issues。

  • hrlc 回复了此帖

    hrlc
    其实可以暂时先不用管这个,kubernetes v1.26 我们也计划支持呢。

    现在我们开始修复,日志出错在这一步,我们只要把后续几步完成就行。
    https://github.com/kubesphere/ks-installer/blob/master/roles/ks-monitor/tasks/prometheus-stack.yaml#L24
    现在,进入ks-installer 这个容器:
    kubectl exec -it -n kubesphere-monitoring-system ks-installer-xxxxx-xxx sh

    ~ $ cd  /kubesphere/kubesphere/prometheus
    /kubesphere/kubesphere/prometheus $ ls
    alertmanager         etcd                 grafana              kube-prometheus      kube-state-metrics   kubernetes           kubesphere           node-exporter        prometheus           prometheus-operator  thanos-ruler
    
    /kubesphere/kubesphere/prometheus $ kubectl apply -f kubernetes/ --force
    /kubesphere/kubesphere/prometheus $ kubectl apply -f kubesphere/
    /kubesphere/kubesphere/prometheus $ kubectl apply -f alertmanager/

      frezes
      还有一个组件,notification-manager,用于告警通知的, 这个修复起来有点费力,稍后我们会发布新的版本来修复。这个组件不影响监控功能使用。

      frezes

      该目录下没有kubesphere 目录 ,这步操作略过不要紧吧?

        hrlc
        没关系,跳过就行。
        你在检查下页面,监控应该已经正常了吧

        • hrlc 回复了此帖

          frezes 监控正常了。还是一个组件版本不匹配

          你前面说的 notification-manager 是不是就是下面这个异常?

            hrlc
            这个也没关系,这个跟上边报错一致的,kubernetes API的升级导致的,会在后续后续版本中修复。

              3 个月 后

              kilvn 虽然当下apply能好,但是reboot docker又恢复了,没什么意义

                2 个月 后

                kilvn

                写个Dockerfile文件

                FROM registry.cn-beijing.aliyuncs.com/kubesphereio/ks-installer:v3.3.2

                USER root

                RUN sed -i ‘s#policy/v1beta1#policy/v1#g’ installer/roles/common/files/redis-ha/templates/redis-ha-pdb.yaml \

                && sed -i ‘s#policy/v1beta1#policy/v1#g’ installer/roles/gatekeeper/files/gatekeeper/templates/gatekeeper-admin-podsecuritypolicy.yaml \

                && sed -i ‘s#policy/v1beta1#policy/v1#g’ installer/roles/gatekeeper/files/gatekeeper/templates/gatekeeper-controller-manager-poddisruptionbudget.yaml \

                && sed -i ‘s#policy/v1beta1#policy/v1#g’ installer/roles/ks-monitor/files/prometheus/alertmanager/alertmanager-podDisruptionBudget.yaml \

                && sed -i ‘s#policy/v1beta1#policy/v1#g’ installer/roles/ks-monitor/files/prometheus/prometheus/prometheus-podDisruptionBudget.yaml \

                && sed -i ‘s#policy/v1beta1#policy/v1#g’ installer/roles/ks-monitor/files/prometheus/thanos-ruler/thanos-ruler-podDisruptionBudget.yaml

                USER kubesphere

                docker build -t xxx/kubesphereio/ks-installer:v3.3.2-v1 .

                重新构建的镜像,把ks-installer 的镜像换成自己的,这样就可以了