Skip to content

Commit 6609858

Browse files
aberohamkelseyhightower
authored andcommitted
Enable kubectl portfw on workers, fixes kelseyhightower#78
1 parent 4d44267 commit 6609858

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

docs/01-infrastructure-gcp.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ gcloud compute instances create controller2 \
147147

148148
#### Kubernetes Workers
149149

150+
Include socat depedency on worker VMs to enable kubelet's portfw functionality.
151+
150152
```
151153
gcloud compute instances create worker0 \
152154
--boot-disk-size 200GB \
@@ -155,7 +157,11 @@ gcloud compute instances create worker0 \
155157
--image-project ubuntu-os-cloud \
156158
--machine-type n1-standard-1 \
157159
--private-network-ip 10.240.0.20 \
158-
--subnet kubernetes
160+
--subnet kubernetes \
161+
--metadata startup-script='#! /bin/bash
162+
apt-get update
163+
apt-get install -y socat
164+
EOF'
159165
```
160166

161167
```
@@ -166,7 +172,11 @@ gcloud compute instances create worker1 \
166172
--image-project ubuntu-os-cloud \
167173
--machine-type n1-standard-1 \
168174
--private-network-ip 10.240.0.21 \
169-
--subnet kubernetes
175+
--subnet kubernetes \
176+
--metadata startup-script='#! /bin/bash
177+
apt-get update
178+
apt-get install -y socat
179+
EOF'
170180
```
171181

172182
```
@@ -177,5 +187,9 @@ gcloud compute instances create worker2 \
177187
--image-project ubuntu-os-cloud \
178188
--machine-type n1-standard-1 \
179189
--private-network-ip 10.240.0.22 \
180-
--subnet kubernetes
190+
--subnet kubernetes \
191+
--metadata startup-script='#! /bin/bash
192+
apt-get update
193+
apt-get install -y socat
194+
EOF'
181195
```

0 commit comments

Comments
 (0)