将 csi 驱动程序安装到 kubernetes 命名空间时出错 - 此命令需要 1 个参数:图表名称
Error in installing csidrvier to a kubernetes namesapce - This command needs 1 argument: chart name
我是Kubernetes新手。我正在尝试将 csi 驱动程序安装到 kubernetes 集群中的 Kubernetes 命名空间。我正在使用 helm 2.16 版本使用以下命令进行安装:
.\helm install csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver -n csi
Error: This command needs 1 argument: chart name
也尝试过 运行 :
.\helm install csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver --namespace csi
并得到以下错误:
Error: This command needs 1 argument: chart name
有人可以用正确的命令帮助我吗?
.\helm version
Client: &version.Version{SemVer:"v2.16.12", GitCommit:"47f0b88409e71fd9ca272abc7cd762a56a1c613e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.1", GitCommit:"bbdfe5e7803a12bbdf97e94cd847859890cf4050", GitTreeState:"clean"}
谢谢
根据 official docs:
This command installs a chart archive.
The install argument must be a chart reference, a path to a packaged
chart, a path to an unpacked chart directory or a URL.
To override values in a chart, use either the –values
flag and pass
in a file or use the –set
flag and pass configuration from the
command line. To force string values in –set
, use –set-string
instead. In case a value is large and therefore you want not to use
neither –values
nor –set
, use –set-file
to read the single large
value from file.
CHART REFERENCES
A chart reference is a convenient way of reference a chart in a chart
repository.
When you use a chart reference with a repo prefix (‘stable/mariadb’),
Helm will look in the local configuration for a chart repository named
‘stable’, and will then look for a chart in that repository whose name
is ‘mariadb’. It will install the latest version of that chart unless
you also supply a version number with the ‘–version’ flag.
To see the list of chart repositories, use ‘helm repo list’. To search
for charts in a repository, use ‘helm search’.
helm install [CHART] [flags]
注意:
-n, --name string release name. If unspecified, it will autogenerate one for you
和:
--namespace string namespace to install the release into. Defaults to the current kube config namespace.
您看到的错误表示您没有正确引用图表名称。 --name
(csi-secrets-store
和 csi
)的参数似乎太多了。例如它应该看起来更像这样:
helm install --name <release name> --namespace <namespace>
这将被翻译成您的用例:
helm install --name csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver --namespace csi
*请注意,我不确定您要使用的值,因此您必须自己检查并根据需要进行调整。这里我假设 csi
是命名空间,csi-secrets-store
是发布名称,secrets-store-csi-driver/secrets-store-csi-driver
是 repo/chart 名称。
还要确保你要安装的chart不需要Helm v3.0+。如果是这样,那么您必须在安装前升级它。
我是Kubernetes新手。我正在尝试将 csi 驱动程序安装到 kubernetes 集群中的 Kubernetes 命名空间。我正在使用 helm 2.16 版本使用以下命令进行安装:
.\helm install csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver -n csi
Error: This command needs 1 argument: chart name
也尝试过 运行 :
.\helm install csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver --namespace csi
并得到以下错误:
Error: This command needs 1 argument: chart name
有人可以用正确的命令帮助我吗?
.\helm version
Client: &version.Version{SemVer:"v2.16.12", GitCommit:"47f0b88409e71fd9ca272abc7cd762a56a1c613e", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.1", GitCommit:"bbdfe5e7803a12bbdf97e94cd847859890cf4050", GitTreeState:"clean"}
谢谢
根据 official docs:
This command installs a chart archive.
The install argument must be a chart reference, a path to a packaged chart, a path to an unpacked chart directory or a URL.
To override values in a chart, use either the
–values
flag and pass in a file or use the–set
flag and pass configuration from the command line. To force string values in–set
, use–set-string
instead. In case a value is large and therefore you want not to use neither–values
nor–set
, use–set-file
to read the single large value from file.CHART REFERENCES
A chart reference is a convenient way of reference a chart in a chart repository.
When you use a chart reference with a repo prefix (‘stable/mariadb’), Helm will look in the local configuration for a chart repository named ‘stable’, and will then look for a chart in that repository whose name is ‘mariadb’. It will install the latest version of that chart unless you also supply a version number with the ‘–version’ flag.
To see the list of chart repositories, use ‘helm repo list’. To search for charts in a repository, use ‘helm search’.
helm install [CHART] [flags]
注意:
-n, --name string release name. If unspecified, it will autogenerate one for you
和:
--namespace string namespace to install the release into. Defaults to the current kube config namespace.
您看到的错误表示您没有正确引用图表名称。 --name
(csi-secrets-store
和 csi
)的参数似乎太多了。例如它应该看起来更像这样:
helm install --name <release name> --namespace <namespace>
这将被翻译成您的用例:
helm install --name csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver --namespace csi
*请注意,我不确定您要使用的值,因此您必须自己检查并根据需要进行调整。这里我假设 csi
是命名空间,csi-secrets-store
是发布名称,secrets-store-csi-driver/secrets-store-csi-driver
是 repo/chart 名称。
还要确保你要安装的chart不需要Helm v3.0+。如果是这样,那么您必须在安装前升级它。