fixed host name to match existing doc + Modified CA instruction for Azure
parent
e0a3247ee5
commit
ca0913f4f3
|
@ -210,7 +210,7 @@ Create VM
|
|||
```
|
||||
azure vm create \
|
||||
--resource-group the-hard-way \
|
||||
--name etcd-0 \
|
||||
--name etcd0 \
|
||||
--vm-size Standard_D4 \
|
||||
--nic-name etcd-0-nic \
|
||||
--vnet-name the-hard-way-net \
|
||||
|
@ -244,7 +244,7 @@ Create VM
|
|||
```
|
||||
azure vm create \
|
||||
--resource-group the-hard-way \
|
||||
--name etcd-1 \
|
||||
--name etcd1 \
|
||||
--vm-size Standard_D4 \
|
||||
--nic-name etcd-1-nic \
|
||||
--vnet-name the-hard-way-net \
|
||||
|
@ -278,7 +278,7 @@ Create VM
|
|||
```
|
||||
azure vm create \
|
||||
--resource-group the-hard-way \
|
||||
--name etcd-2 \
|
||||
--name etcd2 \
|
||||
--vm-size Standard_D4 \
|
||||
--nic-name etcd-2-nic \
|
||||
--vnet-name the-hard-way-net \
|
||||
|
@ -361,7 +361,7 @@ Create VM
|
|||
```
|
||||
azure vm create \
|
||||
--resource-group the-hard-way \
|
||||
--name controller-0 \
|
||||
--name controller0 \
|
||||
--vm-size Standard_D4 \
|
||||
--nic-name controller-0-nic \
|
||||
--vnet-name the-hard-way-net \
|
||||
|
@ -397,7 +397,7 @@ Create VM
|
|||
```
|
||||
azure vm create \
|
||||
--resource-group the-hard-way \
|
||||
--name controller-1 \
|
||||
--name controller1 \
|
||||
--vm-size Standard_D4 \
|
||||
--nic-name controller-1-nic \
|
||||
--vnet-name the-hard-way-net \
|
||||
|
@ -433,7 +433,7 @@ Create VM
|
|||
```
|
||||
azure vm create \
|
||||
--resource-group the-hard-way \
|
||||
--name controller-2 \
|
||||
--name controller2 \
|
||||
--vm-size Standard_D4 \
|
||||
--nic-names controller-2-nic \
|
||||
--vnet-name the-hard-way-net \
|
||||
|
@ -526,7 +526,7 @@ Create VM
|
|||
```
|
||||
azure vm create \
|
||||
--resource-group the-hard-way \
|
||||
--name worker-0 \
|
||||
--name worker0 \
|
||||
--vm-size Standard_D4 \
|
||||
--nic-name worker-0-nic \
|
||||
--vnet-name the-hard-way-net \
|
||||
|
@ -563,7 +563,7 @@ Create VM
|
|||
```
|
||||
azure vm create \
|
||||
--resource-group the-hard-way \
|
||||
--name worker-1 \
|
||||
--name worker1 \
|
||||
--vm-size Standard_D4 \
|
||||
--nic-name worker-1-nic \
|
||||
--vnet-name the-hard-way-net \
|
||||
|
@ -600,7 +600,7 @@ Create VM
|
|||
```
|
||||
azure vm create \
|
||||
--resource-group the-hard-way \
|
||||
--name worker-2 \
|
||||
--name worker2 \
|
||||
--vm-size Standard_D4 \
|
||||
--nic-name worker-2-nic \
|
||||
--vnet-name the-hard-way-net \
|
||||
|
|
|
@ -137,6 +137,14 @@ KUBERNETES_PUBLIC_ADDRESS=$(aws elb describe-load-balancers \
|
|||
jq -r '.LoadBalancerDescriptions[].DNSName')
|
||||
```
|
||||
|
||||
#### Azure
|
||||
```
|
||||
KUBERNETES_PUBLIC_ADDRESS=$(azure network public-ip show \
|
||||
--resource-group the-hard-way \
|
||||
--name the-hard-way-workers \
|
||||
--json | jq -r '.dnsSettings.fqdn')
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Create the `kubernetes-csr.json` file:
|
||||
|
@ -242,3 +250,42 @@ for host in ${KUBERNETES_HOSTS[*]}; do
|
|||
ubuntu@${PUBLIC_IP_ADDRESS}:~/
|
||||
done
|
||||
```
|
||||
|
||||
### Azure
|
||||
If you used the jumpbox to configure the CA
|
||||
```
|
||||
for host in ${KUBERNETES_HOSTS[*]}; do
|
||||
scp -i ./cluster ca.pem kubernetes-key.pem kubernetes.pem \
|
||||
thehardway@${host}:~/
|
||||
done
|
||||
```
|
||||
If you used a different machine
|
||||
```
|
||||
|
||||
#Get jumpbox address
|
||||
|
||||
KUBERNETES_JUMPBOX_ADDRESS=$(azure network public-ip show \
|
||||
--resource-group the-hard-way \
|
||||
--name the-hard-way-jumpbox \
|
||||
--json | jq -r '.dnsSettings.fqdn')
|
||||
|
||||
#Copy files to jumpbox
|
||||
scp -i ./keys/cluster \
|
||||
ca.pem \
|
||||
kubernetes-key.pem \
|
||||
kubernetes.pem \
|
||||
thehardway@$KUBERNETES_JUMPBOX_ADDRESS:~/
|
||||
|
||||
# Copy files from jumpbox to vms
|
||||
ssh -i ./keys/cluster \
|
||||
thehardway@$KUBERNETES_JUMPBOX_ADDRESS <<'EOF'
|
||||
|
||||
KUBERNETES_HOSTS=(controller0 controller1 controller2 etcd0 etcd1 etcd2 worker0 worker1 worker2)
|
||||
for host in ${KUBERNETES_HOSTS[*]}; do
|
||||
scp -i ./cluster ca.pem kubernetes-key.pem kubernetes.pem \
|
||||
thehardway@${host}:~/
|
||||
done
|
||||
|
||||
EOF
|
||||
|
||||
```
|
Loading…
Reference in New Issue