執(zhí)行helm install ui aliyun/weave-scope時報錯?
報錯情況如下:
[root@k8smaster ~]# helm install ui aliyun/weave-scope
Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "weave-scope-agent-ui" namespace: "" from "": no matches for kind "ClusterRole" in version "rbac.authorization.k8s.io/v1beta1"
ensure CRDs are installed first, resource mapping not found for name: "ui-weave-scope" namespace: "" from "": no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"
ensure CRDs are installed first, resource mapping not found for name: "weave-scope-agent-ui" namespace: "" from "": no matches for kind "DaemonSet" in version "extensions/v1beta1"
ensure CRDs are installed first, resource mapping not found for name: "weave-scope-frontend-ui" namespace: "" from "": no matches for kind "Deployment" in version "apps/v1beta1"
ensure CRDs are installed first]
原因:K8s中RBAC權(quán)限處理在Kubernetes的1.5版本中引入,在1.6版本時升級為Beta版本,在1.8版本時升級為GA……? ?weave版本低,k8s版本高,k8s版本和安裝的yaml文件中對應(yīng)的apiVersion版本不對,版本不兼容,根據(jù)報錯情況修改即可。
解決:
無法直接安裝,就先將包下載到當(dāng)前目錄.
[root@k8smaster ~]# helm pull aliyun/weave-scope
[root@k8smaster ~]# ls | grep weave
weave-scope-0.9.2.tgz
解壓這個包【若提示xxx不可信的舊時間戳,無所謂的不用管它】
[root@k8smaster ~]# tar zxvf weave-scope-0.9.2.tgz
進入解壓出來的文件夾,根據(jù)報錯內(nèi)容執(zhí)行
[root@k8smaster ~]# cd weave-scope
[root@k8smaster weave-scope]# grep -r v1beta1
charts/weave-scope-agent/templates/clusterrole.yaml:apiVersion: rbac.authorization.k8s.io/v1beta1
charts/weave-scope-agent/templates/clusterrolebinding.yaml:apiVersion: rbac.authorization.k8s.io/v1beta1
charts/weave-scope-agent/templates/daemonset.yaml:apiVersion: extensions/v1beta1
charts/weave-scope-frontend/templates/deployment.yaml:apiVersion: apps/v1beta1
將所有對應(yīng)yaml中的...v1beta1,更換成...v1即可
需要注意的是:daemonset.yaml文件中的extensions/v1beta1務(wù)必改成apps/v1
?【其它文件的修改,正常修改為...v1即可,不在此過多展示】
修改完成后,回到weave-scope文件夾的所在目錄,再進行安裝。
[root@k8smaster weave-scope]# cd ..
[root@k8smaster ~]# ls | grep weave-scope
weave-scope
[root@k8smaster ~]# helm install ui weave-scope
NAME: ui
LAST DEPLOYED: Wed Jul 26 09:16:49 2023
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
安裝成功文章來源:http://www.zghlxwxcb.cn/news/detail-736766.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-736766.html
到了這里,關(guān)于helm install報錯Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest:的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!