Skip to content

Commit be84590

Browse files
update to Kubernetes 1.4
1 parent 7fe980d commit be84590

File tree

9 files changed

+118
-195
lines changed

9 files changed

+118
-195
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ The target audience for this tutorial is someone planning to support a productio
1717

1818
## Cluster Details
1919

20-
* Kubernetes 1.3.6
21-
* Docker 1.11.2
20+
* Kubernetes 1.4.0
21+
* Docker 1.12.1
2222
* [CNI Based Networking](https://github.com/containernetworking/cni)
2323
* Secure communication between all components (etcd, control plane, workers)
2424
* Default Service Account and Secrets

docs/01-infrastructure-aws.md

Lines changed: 8 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cloud Infrastructure Provisioning - Amazon Web Services
22

3-
This lab will walk you through provisioning the compute instances required for running a H/A Kubernetes cluster. A total of 9 virtual machines will be created.
3+
This lab will walk you through provisioning the compute instances required for running a H/A Kubernetes cluster. A total of 6 virtual machines will be created.
44

55
The guide assumes you'll be creating resources in the `us-west-2` region.
66

@@ -280,65 +280,6 @@ ssh ubuntu@${WORKER_0_PUBLIC_IP_ADDRESS}
280280

281281
### Virtual Machines
282282

283-
#### etcd
284-
285-
```
286-
ETCD_0_INSTANCE_ID=$(aws ec2 run-instances \
287-
--associate-public-ip-address \
288-
--image-id ${IMAGE_ID} \
289-
--count 1 \
290-
--key-name kubernetes \
291-
--security-group-ids ${SECURITY_GROUP_ID} \
292-
--instance-type t2.small \
293-
--private-ip-address 10.240.0.10 \
294-
--subnet-id ${SUBNET_ID} | \
295-
jq -r '.Instances[].InstanceId')
296-
```
297-
298-
```
299-
aws ec2 create-tags \
300-
--resources ${ETCD_0_INSTANCE_ID} \
301-
--tags Key=Name,Value=etcd0
302-
```
303-
304-
```
305-
ETCD_1_INSTANCE_ID=$(aws ec2 run-instances \
306-
--associate-public-ip-address \
307-
--image-id ${IMAGE_ID} \
308-
--count 1 \
309-
--key-name kubernetes \
310-
--security-group-ids ${SECURITY_GROUP_ID} \
311-
--instance-type t2.small \
312-
--private-ip-address 10.240.0.11 \
313-
--subnet-id ${SUBNET_ID} | \
314-
jq -r '.Instances[].InstanceId')
315-
```
316-
317-
```
318-
aws ec2 create-tags \
319-
--resources ${ETCD_1_INSTANCE_ID} \
320-
--tags Key=Name,Value=etcd1
321-
```
322-
323-
```
324-
ETCD_2_INSTANCE_ID=$(aws ec2 run-instances \
325-
--associate-public-ip-address \
326-
--image-id ${IMAGE_ID} \
327-
--count 1 \
328-
--key-name kubernetes \
329-
--security-group-ids ${SECURITY_GROUP_ID} \
330-
--instance-type t2.small \
331-
--private-ip-address 10.240.0.12 \
332-
--subnet-id ${SUBNET_ID} | \
333-
jq -r '.Instances[].InstanceId')
334-
```
335-
336-
```
337-
aws ec2 create-tags \
338-
--resources ${ETCD_2_INSTANCE_ID} \
339-
--tags Key=Name,Value=etcd2
340-
```
341-
342283
#### Kubernetes Controllers
343284

344285
```
@@ -350,7 +291,7 @@ CONTROLLER_0_INSTANCE_ID=$(aws ec2 run-instances \
350291
--key-name kubernetes \
351292
--security-group-ids ${SECURITY_GROUP_ID} \
352293
--instance-type t2.small \
353-
--private-ip-address 10.240.0.20 \
294+
--private-ip-address 10.240.0.10 \
354295
--subnet-id ${SUBNET_ID} | \
355296
jq -r '.Instances[].InstanceId')
356297
```
@@ -376,7 +317,7 @@ CONTROLLER_1_INSTANCE_ID=$(aws ec2 run-instances \
376317
--key-name kubernetes \
377318
--security-group-ids ${SECURITY_GROUP_ID} \
378319
--instance-type t2.small \
379-
--private-ip-address 10.240.0.21 \
320+
--private-ip-address 10.240.0.11 \
380321
--subnet-id ${SUBNET_ID} | \
381322
jq -r '.Instances[].InstanceId')
382323
```
@@ -402,7 +343,7 @@ CONTROLLER_2_INSTANCE_ID=$(aws ec2 run-instances \
402343
--key-name kubernetes \
403344
--security-group-ids ${SECURITY_GROUP_ID} \
404345
--instance-type t2.small \
405-
--private-ip-address 10.240.0.22 \
346+
--private-ip-address 10.240.0.12 \
406347
--subnet-id ${SUBNET_ID} | \
407348
jq -r '.Instances[].InstanceId')
408349
```
@@ -430,7 +371,7 @@ WORKER_0_INSTANCE_ID=$(aws ec2 run-instances \
430371
--key-name kubernetes \
431372
--security-group-ids ${SECURITY_GROUP_ID} \
432373
--instance-type t2.small \
433-
--private-ip-address 10.240.0.30 \
374+
--private-ip-address 10.240.0.20 \
434375
--subnet-id ${SUBNET_ID} | \
435376
jq -r '.Instances[].InstanceId')
436377
```
@@ -456,7 +397,7 @@ WORKER_1_INSTANCE_ID=$(aws ec2 run-instances \
456397
--key-name kubernetes \
457398
--security-group-ids ${SECURITY_GROUP_ID} \
458399
--instance-type t2.small \
459-
--private-ip-address 10.240.0.31 \
400+
--private-ip-address 10.240.0.21 \
460401
--subnet-id ${SUBNET_ID} | \
461402
jq -r '.Instances[].InstanceId')
462403
```
@@ -482,7 +423,7 @@ WORKER_2_INSTANCE_ID=$(aws ec2 run-instances \
482423
--key-name kubernetes \
483424
--security-group-ids ${SECURITY_GROUP_ID} \
484425
--instance-type t2.small \
485-
--private-ip-address 10.240.0.32 \
426+
--private-ip-address 10.240.0.22 \
486427
--subnet-id ${SUBNET_ID} | \
487428
jq -r '.Instances[].InstanceId')
488429
```
@@ -508,13 +449,10 @@ aws ec2 describe-instances \
508449
jq -j '.Reservations[].Instances[] | .InstanceId, " ", .Placement.AvailabilityZone, " ", .PrivateIpAddress, " ", .PublicIpAddress, "\n"'
509450
```
510451
```
511-
i-f3714f2e us-west-2c 10.240.0.22 XX.XXX.XX.XX
512452
i-ae714f73 us-west-2c 10.240.0.11 XX.XX.XX.XXX
513453
i-f4714f29 us-west-2c 10.240.0.21 XX.XX.XXX.XXX
514454
i-f6714f2b us-west-2c 10.240.0.12 XX.XX.XX.XX
515-
i-e26e503f us-west-2c 10.240.0.30 XX.XX.XXX.XXX
516-
i-e36e503e us-west-2c 10.240.0.31 XX.XX.XX.XX
455+
i-e26e503f us-west-2c 10.240.0.22 XX.XX.XXX.XXX
517456
i-e8714f35 us-west-2c 10.240.0.10 XX.XX.XXX.XXX
518457
i-78704ea5 us-west-2c 10.240.0.20 XX.XX.XXX.XXX
519-
i-4a6e5097 us-west-2c 10.240.0.32 XX.XX.XX.XX
520458
```

docs/01-infrastructure-gcp.md

Lines changed: 20 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
# Cloud Infrastructure Provisioning - Google Cloud Platform
22

3-
This lab will walk you through provisioning the compute instances required for running a H/A Kubernetes cluster. A total of 9 virtual machines will be created.
4-
5-
If you are following this guide using the GCP free trial you may run into the following error:
6-
7-
```
8-
ERROR: (gcloud.compute.instances.create) Some requests did not succeed:
9-
- Quota 'CPUS' exceeded. Limit: 8.0
10-
```
11-
12-
This means you'll only be able to create 8 machines until you upgrade your account. In that case skip the provisioning of the `worker2` node to avoid hitting the CPUS qouta.
3+
This lab will walk you through provisioning the compute instances required for running a H/A Kubernetes cluster. A total of 6 virtual machines will be created.
134

145
After completing this guide you should have the following compute instances:
156

@@ -19,15 +10,12 @@ gcloud compute instances list
1910

2011
````
2112
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
22-
controller0 us-central1-f n1-standard-1 10.240.0.20 XXX.XXX.XXX.XXX RUNNING
23-
controller1 us-central1-f n1-standard-1 10.240.0.21 XXX.XXX.XXX.XXX RUNNING
24-
controller2 us-central1-f n1-standard-1 10.240.0.22 XXX.XXX.XXX.XXX RUNNING
25-
etcd0 us-central1-f n1-standard-1 10.240.0.10 XXX.XXX.XXX.XXX RUNNING
26-
etcd1 us-central1-f n1-standard-1 10.240.0.11 XXX.XXX.XXX.XXX RUNNING
27-
etcd2 us-central1-f n1-standard-1 10.240.0.12 XXX.XXX.XXX.XXX RUNNING
28-
worker0 us-central1-f n1-standard-1 10.240.0.30 XXX.XXX.XXX.XXX RUNNING
29-
worker1 us-central1-f n1-standard-1 10.240.0.31 XXX.XXX.XXX.XXX RUNNING
30-
worker2 us-central1-f n1-standard-1 10.240.0.32 XXX.XXX.XXX.XXX RUNNING
13+
controller0 us-central1-f n1-standard-1 10.240.0.10 XXX.XXX.XXX.XXX RUNNING
14+
controller1 us-central1-f n1-standard-1 10.240.0.11 XXX.XXX.XXX.XXX RUNNING
15+
controller2 us-central1-f n1-standard-1 10.240.0.12 XXX.XXX.XXX.XXX RUNNING
16+
worker0 us-central1-f n1-standard-1 10.240.0.20 XXX.XXX.XXX.XXX RUNNING
17+
worker1 us-central1-f n1-standard-1 10.240.0.21 XXX.XXX.XXX.XXX RUNNING
18+
worker2 us-central1-f n1-standard-1 10.240.0.22 XXX.XXX.XXX.XXX RUNNING
3119
````
3220

3321
> All machines will be provisioned with fixed private IP addresses to simplify the bootstrap process.
@@ -50,8 +38,7 @@ Create a subnet for the Kubernetes cluster:
5038
```
5139
gcloud compute networks subnets create kubernetes \
5240
--network kubernetes \
53-
--range 10.240.0.0/24 \
54-
--region us-central1
41+
--range 10.240.0.0/24
5542
```
5643

5744
```
@@ -140,73 +127,38 @@ All the VMs in this lab will be provisioned using Ubuntu 16.04 mainly because it
140127

141128
### Virtual Machines
142129

143-
#### etcd
144-
145-
```
146-
gcloud compute instances create etcd0 \
147-
--boot-disk-size 200GB \
148-
--can-ip-forward \
149-
--image ubuntu-1604-xenial-v20160627 \
150-
--image-project ubuntu-os-cloud \
151-
--machine-type n1-standard-1 \
152-
--private-network-ip 10.240.0.10 \
153-
--subnet kubernetes
154-
```
155-
156-
```
157-
gcloud compute instances create etcd1 \
158-
--boot-disk-size 200GB \
159-
--can-ip-forward \
160-
--image ubuntu-1604-xenial-v20160627 \
161-
--image-project ubuntu-os-cloud \
162-
--machine-type n1-standard-1 \
163-
--private-network-ip 10.240.0.11 \
164-
--subnet kubernetes
165-
```
166-
167-
```
168-
gcloud compute instances create etcd2 \
169-
--boot-disk-size 200GB \
170-
--can-ip-forward \
171-
--image ubuntu-1604-xenial-v20160627 \
172-
--image-project ubuntu-os-cloud \
173-
--machine-type n1-standard-1 \
174-
--private-network-ip 10.240.0.12 \
175-
--subnet kubernetes
176-
```
177-
178130
#### Kubernetes Controllers
179131

180132
```
181133
gcloud compute instances create controller0 \
182134
--boot-disk-size 200GB \
183135
--can-ip-forward \
184-
--image ubuntu-1604-xenial-v20160627 \
136+
--image ubuntu-1604-xenial-v20160921 \
185137
--image-project ubuntu-os-cloud \
186138
--machine-type n1-standard-1 \
187-
--private-network-ip 10.240.0.20 \
139+
--private-network-ip 10.240.0.10 \
188140
--subnet kubernetes
189141
```
190142

191143
```
192144
gcloud compute instances create controller1 \
193145
--boot-disk-size 200GB \
194146
--can-ip-forward \
195-
--image ubuntu-1604-xenial-v20160627 \
147+
--image ubuntu-1604-xenial-v20160921 \
196148
--image-project ubuntu-os-cloud \
197149
--machine-type n1-standard-1 \
198-
--private-network-ip 10.240.0.21 \
150+
--private-network-ip 10.240.0.11 \
199151
--subnet kubernetes
200152
```
201153

202154
```
203155
gcloud compute instances create controller2 \
204156
--boot-disk-size 200GB \
205157
--can-ip-forward \
206-
--image ubuntu-1604-xenial-v20160627 \
158+
--image ubuntu-1604-xenial-v20160921 \
207159
--image-project ubuntu-os-cloud \
208160
--machine-type n1-standard-1 \
209-
--private-network-ip 10.240.0.22 \
161+
--private-network-ip 10.240.0.12 \
210162
--subnet kubernetes
211163
```
212164

@@ -216,33 +168,31 @@ gcloud compute instances create controller2 \
216168
gcloud compute instances create worker0 \
217169
--boot-disk-size 200GB \
218170
--can-ip-forward \
219-
--image ubuntu-1604-xenial-v20160627 \
171+
--image ubuntu-1604-xenial-v20160921 \
220172
--image-project ubuntu-os-cloud \
221173
--machine-type n1-standard-1 \
222-
--private-network-ip 10.240.0.30 \
174+
--private-network-ip 10.240.0.20 \
223175
--subnet kubernetes
224176
```
225177

226178
```
227179
gcloud compute instances create worker1 \
228180
--boot-disk-size 200GB \
229181
--can-ip-forward \
230-
--image ubuntu-1604-xenial-v20160627 \
182+
--image ubuntu-1604-xenial-v20160921 \
231183
--image-project ubuntu-os-cloud \
232184
--machine-type n1-standard-1 \
233-
--private-network-ip 10.240.0.31 \
185+
--private-network-ip 10.240.0.21 \
234186
--subnet kubernetes
235187
```
236188

237-
If you are using the GCP free trial which limits your account to 8 nodes, skip the creation of `worker2` to avoid hitting the CPUS qouta.
238-
239189
```
240190
gcloud compute instances create worker2 \
241191
--boot-disk-size 200GB \
242192
--can-ip-forward \
243-
--image ubuntu-1604-xenial-v20160627 \
193+
--image ubuntu-1604-xenial-v20160921 \
244194
--image-project ubuntu-os-cloud \
245195
--machine-type n1-standard-1 \
246-
--private-network-ip 10.240.0.32 \
196+
--private-network-ip 10.240.0.22 \
247197
--subnet kubernetes
248198
```

docs/02-certificate-authority.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,16 @@ cat > kubernetes-csr.json <<EOF
149149
"worker0",
150150
"worker1",
151151
"worker2",
152-
"ip-10-240-0-30",
153-
"ip-10-240-0-31",
154-
"ip-10-240-0-32",
152+
"ip-10-240-0-20",
153+
"ip-10-240-0-21",
154+
"ip-10-240-0-22",
155155
"10.32.0.1",
156156
"10.240.0.10",
157157
"10.240.0.11",
158158
"10.240.0.12",
159159
"10.240.0.20",
160160
"10.240.0.21",
161161
"10.240.0.22",
162-
"10.240.0.30",
163-
"10.240.0.31",
164-
"10.240.0.32",
165162
"${KUBERNETES_PUBLIC_ADDRESS}",
166163
"127.0.0.1"
167164
],
@@ -212,7 +209,7 @@ openssl x509 -in kubernetes.pem -text -noout
212209
Set the list of Kubernetes hosts where the certs should be copied to:
213210

214211
```
215-
KUBERNETES_HOSTS=(controller0 controller1 controller2 etcd0 etcd1 etcd2 worker0 worker1 worker2)
212+
KUBERNETES_HOSTS=(controller0 controller1 controller2 worker0 worker1 worker2)
216213
```
217214

218215
### GCE

0 commit comments

Comments
 (0)