I have the following clusterrole
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: test
rules:
- apiGroups: [""]
resources: ["crontabs"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
with the following error on create
jonathan@sc-test-cluster:~$ kubectl create clusterrole role.yml
error: at least one verb must be specified
You either create it from file using -f
or by specifying the options using clusterrole
, see also the docs, but not both. Try the following:
$ kubectl create -f role.yml