helm安装软件报错解决

环境

操作系统及内核版本

cat /etc/redhat-release 
CentOS Linux release 7.8.2003 (Core)
uname -a
Linux master01 3.10.0-1127.18.2.el7.x86_64 #1 SMP Sun Jul 26 15:27:06 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

k8s软件相关版本

kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:56:40Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:48:36Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
kubelet --version
Kubernetes v1.18.2
docker -v
Docker version 19.03.12, build 48a66213fe

helm版本

kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:54:15Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
helm version
Client: &version.Version{SemVer:"v2.16.6", GitCommit:"dd2e5695da88625b190e6b22e9542550ab503a47", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.6", GitCommit:"dd2e5695da88625b190e6b22e9542550ab503a47", GitTreeState:"clean"}

安装hadoop,首先查看可用的软件

helm search hadoop
NAME         	CHART VERSION	APP VERSION	DESCRIPTION                                                 
stable/hadoop	1.0.4        	2.7.3      	The Apache Hadoop software library is a framework that al...
stable/luigi 	2.7.2        	           	Luigi is a Python module that helps you build complex pip...

报错

helm install stable/hadoop
Error: validation failed: unable to recognize "": no matches for kind "StatefulSet" in version "apps/v1beta1"

解决
在/root/.helm/cache/archive目录下有hadoop相关的压缩文件,如图
在这里插入图片描述
解压

cd /root/.helm/cache/archive/
tar zxvf hadoop-1.0.4.tgz

查看k8s支持的api版本
在这里插入图片描述

修改api版本

cd hadoop/templates/
sed -i 's#apiVersion: apps/v1beta1#apiVersion: apps/v1#g' hdfs-dn-statefulset.yaml
sed -i 's#apiVersion: apps/v1beta1#apiVersion: apps/v1#g' hdfs-nn-statefulset.yaml
sed -i 's#apiVersion: apps/v1beta1#apiVersion: apps/v1#g' yarn-nm-statefulset.yaml 
sed -i 's#apiVersion: apps/v1beta1#apiVersion: apps/v1#g' yarn-rm-statefulset.yaml 

从本地安装hadoop

helm install /root/.helm/cache/archive/hadoop
Error: release linting-hound failed: StatefulSet.apps "linting-hound-hadoop-yarn-nm" is invalid: [spec.selector: Required value, spec.template.metadata.labels: Invalid value: map[string]string{"app":"hadoop", "component":"yarn-nm", "release":"linting-hound"}: `selector` does not match template `labels`]
cd /root/.helm/cache/archive/hadoop/templates/
vim hdfs-dn-statefulset.yaml

红框内是新加的
在这里插入图片描述

cd /root/.helm/cache/archive/hadoop/templates/
vim hdfs-nn-statefulset.yaml

在这里插入图片描述

cd /root/.helm/cache/archive/hadoop/templates/
vim yarn-nm-statefulset.yaml

在这里插入图片描述

cd /root/.helm/cache/archive/hadoop/templates/
vim yarn-rm-statefulset.yaml

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

时空无限

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值