Search code examples
shellcontainerskubectl

shell script inside container with * as parameter value


I have my script running fine on local linux bash shell. howeve it fails to run inside container bash. any hint to work around?

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

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

The same command works when I run it locally on my linux bash shell.

failed output:

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

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


Solution

  • kubectl version 1.9 does not support --resource. I upgraded to 1.13 and that helped. support was added in 1.12.