@@ -1079,37 +1079,37 @@ In order from most secure to least secure, the approaches are:
1079
1079
1080
1080
2. Grant a role to the "default" service account in a namespace
1081
1081
1082
- If an application does not specify a `serviceAccountName`, it uses the "default" service account.
1082
+ If an application does not specify a `serviceAccountName`, it uses the "default" service account.
1083
1083
1084
- {{< note >}}
1085
- Permissions given to the "default" service account are available to any pod
1086
- in the namespace that does not specify a `serviceAccountName`.
1087
- {{< /note >}}
1084
+ {{< note >}}
1085
+ Permissions given to the "default" service account are available to any pod
1086
+ in the namespace that does not specify a `serviceAccountName`.
1087
+ {{< /note >}}
1088
1088
1089
- For example, grant read-only permission within "my-namespace" to the "default" service account :
1089
+ For example, grant read-only permission within "my-namespace" to the "default" service account :
1090
1090
1091
- ` ` ` shell
1092
- kubectl create rolebinding default-view \
1093
- --clusterrole=view \
1094
- --serviceaccount=my-namespace:default \
1095
- --namespace=my-namespace
1096
- ` ` `
1091
+ ` ` ` shell
1092
+ kubectl create rolebinding default-view \
1093
+ --clusterrole=view \
1094
+ --serviceaccount=my-namespace:default \
1095
+ --namespace=my-namespace
1096
+ ` ` `
1097
1097
1098
- Many [add-ons](/docs/concepts/cluster-administration/addons/) run as the
1099
- " default" service account in the `kube-system` namespace.
1100
- To allow those add-ons to run with super-user access, grant cluster-admin
1101
- permissions to the "default" service account in the `kube-system` namespace.
1098
+ Many [add-ons](/docs/concepts/cluster-administration/addons/) run as the
1099
+ " default" service account in the `kube-system` namespace.
1100
+ To allow those add-ons to run with super-user access, grant cluster-admin
1101
+ permissions to the "default" service account in the `kube-system` namespace.
1102
1102
1103
- {{< caution >}}
1104
- Enabling this means the `kube-system` namespace contains Secrets
1105
- that grant super-user access to your cluster's API.
1106
- {{< /caution >}}
1103
+ {{< caution >}}
1104
+ Enabling this means the `kube-system` namespace contains Secrets
1105
+ that grant super-user access to your cluster's API.
1106
+ {{< /caution >}}
1107
1107
1108
- ` ` ` shell
1109
- kubectl create clusterrolebinding add-on-cluster-admin \
1110
- --clusterrole=cluster-admin \
1111
- --serviceaccount=kube-system:default
1112
- ` ` `
1108
+ ` ` ` shell
1109
+ kubectl create clusterrolebinding add-on-cluster-admin \
1110
+ --clusterrole=cluster-admin \
1111
+ --serviceaccount=kube-system:default
1112
+ ` ` `
1113
1113
1114
1114
3. Grant a role to all service accounts in a namespace
1115
1115
0 commit comments