update docs

pull/1/head
Kelsey Hightower 2016-07-07 08:25:27 -07:00
parent d849eced79
commit ee67a09af3
2 changed files with 38 additions and 16 deletions

View File

@ -9,6 +9,16 @@ etcd1 us-central1-f n1-standard-1 10.240.0.11 RUNNING
etcd2 us-central1-f n1-standard-1 10.240.0.12 RUNNING etcd2 us-central1-f n1-standard-1 10.240.0.12 RUNNING
```` ````
## Why
All Kubernetes components are stateless which greatly simplifies managing a Kubernetes cluster. All state is stored
in etcd, which is a database and must be treated special. etcd is being run on a dedicated set of machines for the
following reasons:
* The etcd lifecycle is not tied to Kubernetes. We should be able to upgrade etcd independently of Kubernetes.
* Scaling out etcd is different than scaling out the Kubernetes Control Plane.
* Prevent other applications from taking up resources (CPU, Memory, I/O) required by etcd.
## Copy TLS Certs ## Copy TLS Certs
``` ```

View File

@ -1,7 +1,16 @@
# Kubernetes Controller # Bootstrapping an H/A Kubernetes Control Plane
In this lab you will bootstrap a 3 node Kubernetes controller cluster. The following virtual machines will be used:
```
NAME ZONE MACHINE_TYPE INTERNAL_IP STATUS
controller0 us-central1-f n1-standard-1 10.240.0.20 RUNNING
controller1 us-central1-f n1-standard-1 10.240.0.21 RUNNING
controller2 us-central1-f n1-standard-1 10.240.0.22 RUNNING
```
### Copy TLS Certs ## Copy TLS Certs
``` ```
gcloud compute copy-files ca.pem kubernetes-key.pem kubernetes.pem controller0:~/ gcloud compute copy-files ca.pem kubernetes-key.pem kubernetes.pem controller0:~/
@ -15,6 +24,7 @@ gcloud compute copy-files ca.pem kubernetes-key.pem kubernetes.pem controller1:~
gcloud compute copy-files ca.pem kubernetes-key.pem kubernetes.pem controller2:~/ gcloud compute copy-files ca.pem kubernetes-key.pem kubernetes.pem controller2:~/
``` ```
## Provision the Kubernetes Controller Cluster
### controller0 ### controller0
@ -22,6 +32,18 @@ gcloud compute copy-files ca.pem kubernetes-key.pem kubernetes.pem controller2:~
gcloud compute ssh controller0 gcloud compute ssh controller0
``` ```
Move the TLS certificates in place:
```
sudo mkdir -p /var/run/kubernetes
```
```
sudo mv ca.pem kubernetes-key.pem kubernetes.pem /var/run/kubernetes/
```
Download and install the Kubernetes controller binaries:
``` ```
wget https://github.com/kubernetes/kubernetes/releases/download/v1.3.0/kubernetes.tar.gz wget https://github.com/kubernetes/kubernetes/releases/download/v1.3.0/kubernetes.tar.gz
``` ```
@ -41,17 +63,7 @@ sudo cp kubernetes/server/bin/kube-scheduler /usr/bin/
sudo cp kubernetes/server/bin/kubectl /usr/bin/ sudo cp kubernetes/server/bin/kubectl /usr/bin/
``` ```
``` #### Kubernetes API Server
sudo mkdir -p /var/run/kubernetes
```
```
sudo mv ca.pem kubernetes-key.pem kubernetes.pem /var/run/kubernetes/
```
### Kubernetes API Server
``` ```
wget https://storage.googleapis.com/hightowerlabs/authorization-policy.jsonl wget https://storage.googleapis.com/hightowerlabs/authorization-policy.jsonl
@ -120,7 +132,7 @@ sudo systemctl start kube-apiserver
sudo systemctl status kube-apiserver sudo systemctl status kube-apiserver
``` ```
### Kubernetes Controller Manager #### Kubernetes Controller Manager
``` ```
sudo sh -c 'echo "[Unit] sudo sh -c 'echo "[Unit]
@ -154,7 +166,7 @@ sudo systemctl start kube-controller-manager
sudo systemctl status kube-controller-manager sudo systemctl status kube-controller-manager
``` ```
### Kubernetes Scheduler #### Kubernetes Scheduler
``` ```
sudo sh -c 'echo "[Unit] sudo sh -c 'echo "[Unit]
@ -184,7 +196,7 @@ sudo systemctl status kube-scheduler
``` ```
### Verify #### Verification
``` ```
kubectl get componentstatuses kubectl get componentstatuses