安装kubesphere遇到的问题
frezesK零S
最新的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。
- 已编辑
支持一下嘛,就这最后一步了,不然我把1.26降到1.25估计要崩溃啊。
https://www.cnblogs.com/Mercury-linux/p/16410522.html 这个帖子有修改 version的操作,但是我看不懂啊,
policy/v1 –> policy/v1beta1 是如何修改的?
frezesK零S
- 已编辑
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/
370569218K零S
- 已编辑
写个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 的镜像换成自己的,这样就可以了