Fix orders of yaml of reference/kube* (#14238)

The orders of kind and metadata were inconsistent, and that made the
doc unreadable.
This fixes the orders in consistent way.
This commit is contained in:
Kenichi Omichi 2019-05-08 22:40:47 -07:00 committed by Kubernetes Prow Robot
parent 8e0cab2d64
commit 84163560cc
2 changed files with 7 additions and 7 deletions

View File

@ -191,8 +191,8 @@ To do this, you just need to create a `ClusterRoleBinding` that binds the `syste
``` ```
# enable bootstrapping nodes to create CSR # enable bootstrapping nodes to create CSR
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata: metadata:
name: create-csrs-for-bootstrapping name: create-csrs-for-bootstrapping
subjects: subjects:
@ -259,8 +259,8 @@ To enable the kubelet to request and receive a new certificate, create a `Cluste
```yml ```yml
# Approve all CSRs for the group "system:bootstrappers" # Approve all CSRs for the group "system:bootstrappers"
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata: metadata:
name: auto-approve-csrs-for-group name: auto-approve-csrs-for-group
subjects: subjects:
@ -278,8 +278,8 @@ grants it permission, `system:certificates.k8s.io:certificatesigningrequests:sel
```yml ```yml
# Approve renewal CSRs for the group "system:nodes" # Approve renewal CSRs for the group "system:nodes"
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata: metadata:
name: auto-approve-renewals-for-nodes name: auto-approve-renewals-for-nodes
subjects: subjects:
@ -299,8 +299,8 @@ To create the `ClusterRole`s:
```yml ```yml
# A ClusterRole which instructs the CSR approver to approve a user requesting # A ClusterRole which instructs the CSR approver to approve a user requesting
# node client credentials. # node client credentials.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata: metadata:
name: system:certificates.k8s.io:certificatesigningrequests:nodeclient name: system:certificates.k8s.io:certificatesigningrequests:nodeclient
rules: rules:
@ -310,8 +310,8 @@ rules:
--- ---
# A ClusterRole which instructs the CSR approver to approve a node renewing its # A ClusterRole which instructs the CSR approver to approve a node renewing its
# own client credentials. # own client credentials.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata: metadata:
name: system:certificates.k8s.io:certificatesigningrequests:selfnodeclient name: system:certificates.k8s.io:certificatesigningrequests:selfnodeclient
rules: rules:
@ -348,6 +348,7 @@ Its format is identical to a normal `kubeconfig` file. A sample file might look
```yml ```yml
apiVersion: v1 apiVersion: v1
kind: Config
clusters: clusters:
- cluster: - cluster:
certificate-authority: /var/lib/kubernetes/ca.pem certificate-authority: /var/lib/kubernetes/ca.pem
@ -359,7 +360,6 @@ contexts:
user: kubelet-bootstrap user: kubelet-bootstrap
name: bootstrap name: bootstrap
current-context: bootstrap current-context: bootstrap
kind: Config
preferences: {} preferences: {}
users: users:
- name: kubelet-bootstrap - name: kubelet-bootstrap

View File

@ -214,6 +214,7 @@ it off regardless. Doing so will disable the ability to use the `--discovery-tok
```shell ```shell
kubectl -n kube-public get cm cluster-info -o yaml | grep "kubeconfig:" -A11 | grep "apiVersion" -A10 | sed "s/ //" | tee cluster-info.yaml kubectl -n kube-public get cm cluster-info -o yaml | grep "kubeconfig:" -A11 | grep "apiVersion" -A10 | sed "s/ //" | tee cluster-info.yaml
apiVersion: v1 apiVersion: v1
kind: Config
clusters: clusters:
- cluster: - cluster:
certificate-authority-data: <ca-cert> certificate-authority-data: <ca-cert>
@ -221,7 +222,6 @@ clusters:
name: "" name: ""
contexts: [] contexts: []
current-context: "" current-context: ""
kind: Config
preferences: {} preferences: {}
users: [] users: []
``` ```