[Doc] kubectl is not 'update' but 'apply'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-kubernetes |
In Progress
|
Undecided
|
Yushiro FURUKAWA |
Bug Description
In the latest deployment-guide for kolla-k8s[1], following command is wrong:
$ kubectl update -f <(cat <<EOF
apiVersion: rbac.authorizat
kind: ClusterRoleBinding
metadata:
name: cluster-admin
roleRef:
apiGroup: rbac.authorizat
kind: ClusterRole
name: cluster-admin
subjects:
- kind: Group
name: system:masters
- kind: Group
name: system:
- kind: Group
name: system:
EOF
)
Error: unknown command "update" for "kubectl"
Run 'kubectl --help' for usage.
Regarding help message, it should be 'apply' instead of 'update'.
$ kubectl version
Client Version: version.
Server Version: version.
$ $ kubectl help | grep apply
apply Apply a configuration to a resource by filename or stdin
$ kubectl apply -f <(cat <<EOF
apiVersion: rbac.authorizat
kind: ClusterRoleBinding
metadata:
name: cluster-admin
roleRef:
apiGroup: rbac.authorizat
kind: ClusterRole
name: cluster-admin
subjects:
- kind: Group
name: system:masters
- kind: Group
name: system:
- kind: Group
name: system:
EOF
)
error: error validating "/dev/fd/63": error validating data:
unknown object type schema.
if you choose to ignore these errors, turn validation off with --validate=false
$ kubectl apply -f <(cat <<EOF
apiVersion: rbac.authorizat
kind: ClusterRoleBinding
metadata:
name: cluster-admin
roleRef:
apiGroup: rbac.authorizat
kind: ClusterRole
name: cluster-admin
subjects:
- kind: Group
name: system:masters
- kind: Group
name: system:
- kind: Group
name: system:
EOF
) --validate=false
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
clusterrolebinding "cluster-admin" configured
Therefore, 'update' should be changed into 'apply' and necessary to add '--validate=false'
Changed in kolla-kubernetes: | |
assignee: | nobody → Yushiro FURUKAWA (y-furukawa-2) |
description: | updated |
Fix proposed to branch: master /review. openstack. org/526919
Review: https:/