shell 容器内的脚本,以 * 作为参数值

shell script inside container with * as parameter value

我的脚本 运行在本地 linux bash shell 上运行良好。但是它无法 运行 进入容器 bash。有什么解决方法吗?

kubectl create clusterrole cluster-admin-devops --verb=* \
    --non-resource-url=* --resource=*.* 

the server doesn't have a resource type "" in group ""

当我在 linux bash shell 上 运行 本地时,同样的命令有效。

输出失败:

kubectl create clusterrole cluster-admin-devops '--verb=*' \
    '--non-resource-url=*' '--resource=*.*'

the server doesn't have a resource type "" in group ""

kubectl 1.9 版本不支持 --resource。我升级到 1.13,这很有帮助。 1.12 添加了支持。