You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ The target audience for this tutorial is someone planning to support a productio
14
14
15
15
Kubernetes The Hard Way guides you through bootstrapping a highly available Kubernetes cluster with end-to-end encryption between components and RBAC authentication.
The compute instances in this lab will be provisioned using [Ubuntu Server](https://www.ubuntu.com/server) 16.04, which has good support for the [CRI-O container runtime](https://github.com/kubernetes-incubator/cri-o). Each compute instance will be provisioned with a fixed private IP address to simplify the Kubernetes bootstrapping process.
105
+
The compute instances in this lab will be provisioned using [Ubuntu Server](https://www.ubuntu.com/server) 16.04, which has good support for the [cri-containerd container runtime](https://github.com/kubernetes-incubator/cri-containerd). Each compute instance will be provisioned with a fixed private IP address to simplify the Kubernetes bootstrapping process.
> Remember to run the above commands on each controller node: `controller-0`, `controller-1`, and `controller-2`.
193
193
194
+
## RBAC for Kubelet Authorization
195
+
196
+
In this section you will configure RBAC permissions to allow the Kubernetes API Server to access the Kubelet API on each worker node. Access to the Kubelet API is required for retrieving metrics, logs, and executing commands in pods.
197
+
198
+
> This tutorial sets the Kubelet `--authorization-mode` flag to `Webhook`. Webhook mode uses the [SubjectAccessReview](https://kubernetes.io/docs/admin/authorization/#checking-api-access) API to determine authorization.
199
+
200
+
```
201
+
gcloud compute ssh controller-0
202
+
```
203
+
204
+
Create the `system:kube-apiserver-to-kubelet`[ClusterRole](https://kubernetes.io/docs/admin/authorization/rbac/#role-and-clusterrole) with permissions to access the Kubelet API and perform most common tasks associated with managing pods:
The Kubernetes API Server authenticates to the Kubelet as the `kubernetes` user using the client certificate as defined by the `--kubelet-client-certificate` flag.
231
+
232
+
Bind the `system:kube-apiserver-to-kubelet` ClusterRole to the `kubernetes` user:
233
+
234
+
```
235
+
cat <<EOF | kubectl apply -f -
236
+
apiVersion: rbac.authorization.k8s.io/v1beta1
237
+
kind: ClusterRoleBinding
238
+
metadata:
239
+
name: system:kube-apiserver
240
+
namespace: ""
241
+
roleRef:
242
+
apiGroup: rbac.authorization.k8s.io
243
+
kind: ClusterRole
244
+
name: system:kube-apiserver-to-kubelet
245
+
subjects:
246
+
- apiGroup: rbac.authorization.k8s.io
247
+
kind: User
248
+
name: kubernetes
249
+
EOF
250
+
```
251
+
194
252
## The Kubernetes Frontend Load Balancer
195
253
196
254
In this section you will provision an external load balancer to front the Kubernetes API Servers. The `kubernetes-the-hard-way` static IP address will be attached to the resulting load balancer.
@@ -200,15 +258,7 @@ In this section you will provision an external load balancer to front the Kubern
200
258
Create the external load balancer network resources:
0 commit comments