[Doc] kubectl is not 'update' but 'apply'

Bug #1737389 reported by Yushiro FURUKAWA
6
This bug affects 1 person
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.authorization.k8s.io/v1alpha1
kind: ClusterRoleBinding
metadata:
  name: cluster-admin
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: Group
  name: system:masters
- kind: Group
  name: system:authenticated
- kind: Group
  name: system:unauthenticated
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.Info{Major:"1", Minor:"8", GitVersion:"v1.8.5", GitCommit:"cce11c6a185279d037023e02ac5249e14daa22bf", GitTreeState:"clean", BuildDate:"2017-12-07T16:16:03Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.5", GitCommit:"cce11c6a185279d037023e02ac5249e14daa22bf", GitTreeState:"clean", BuildDate:"2017-12-07T16:05:18Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

$ $ kubectl help | grep apply
  apply Apply a configuration to a resource by filename or stdin

$ kubectl apply -f <(cat <<EOF
apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRoleBinding
metadata:
name: cluster-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: Group
name: system:masters
- kind: Group
name: system:authenticated
- kind: Group
name: system:unauthenticated
EOF
)
error: error validating "/dev/fd/63": error validating data:
unknown object type schema.GroupVersionKind{Group:"rbac.authorization.k8s.io", Version:"v1alpha1", Kind:"ClusterRoleBinding"};
if you choose to ignore these errors, turn validation off with --validate=false

$ kubectl apply -f <(cat <<EOF
apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRoleBinding
metadata:
name: cluster-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: Group
name: system:masters
- kind: Group
name: system:authenticated
- kind: Group
name: system:unauthenticated
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'

[1] https://docs.openstack.org/kolla-kubernetes/latest/deployment-guide.html#step-3-deploying-kolla-kubernetes

Tags: doc
Changed in kolla-kubernetes:
assignee: nobody → Yushiro FURUKAWA (y-furukawa-2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla-kubernetes (master)

Fix proposed to branch: master
Review: https://review.openstack.org/526919

Changed in kolla-kubernetes:
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla-kubernetes (master)

Change abandoned by Yushiro FURUKAWA (<email address hidden>) on branch: master
Review: https://review.openstack.org/526919
Reason: move to https://review.openstack.org/#/c/524125/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.