Updated the rest of the docs
parent
ec38f3a971
commit
292550c792
|
@ -137,6 +137,12 @@ KUBERNETES_PUBLIC_ADDRESS=$(aws elb describe-load-balancers \
|
|||
jq -r '.LoadBalancerDescriptions[].DNSName')
|
||||
```
|
||||
|
||||
#OpenStack
|
||||
|
||||
```
|
||||
KUBERNETES_PUBLIC_ADDRESS=$(openstack server show controller0 -f shell |grep addresses | awk '{print $2}'| sed 's/"$//')
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Create the `kubernetes-csr.json` file:
|
||||
|
@ -239,3 +245,30 @@ for host in ${KUBERNETES_HOSTS[*]}; do
|
|||
ubuntu@${PUBLIC_IP_ADDRESS}:~/
|
||||
done
|
||||
```
|
||||
|
||||
### OpenStack
|
||||
Since only controller0 has a public IP, you will need to SCP controller0 and then scp it to the remaining 5 hosts from there.
|
||||
|
||||
Copy to controller0:
|
||||
|
||||
```
|
||||
scp ca.pem kubernetes-key.pem kubernetes.pem \
|
||||
ubuntu@${KUBERNETES_PUBLIC_ADDRESS}:~/
|
||||
```
|
||||
|
||||
Now SSH to controller0.
|
||||
|
||||
Set the list of Kubernetes hosts where the certs should be copied to:
|
||||
|
||||
```
|
||||
KUBERNETES_HOSTS=(10.240.0.10 10.240.0.11 10.240.0.12 10.240.0.20 10.240.0.21 10.240.0.22)
|
||||
```
|
||||
|
||||
And then copy the TLS certs:
|
||||
|
||||
```
|
||||
for host in ${KUBERNETES_HOSTS[*]}; do
|
||||
scp ca.pem kubernetes-key.pem kubernetes.pem \
|
||||
ubuntu@${KUBERNETES_HOSTS}:~/
|
||||
done
|
||||
```
|
||||
|
|
|
@ -101,7 +101,7 @@ INTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" \
|
|||
http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip)
|
||||
```
|
||||
|
||||
#### AWS
|
||||
#### AWS / OpenStack
|
||||
|
||||
```
|
||||
INTERNAL_IP=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
|
||||
|
|
|
@ -132,7 +132,7 @@ INTERNAL_IP=$(curl -s -H "Metadata-Flavor: Google" \
|
|||
http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ip)
|
||||
```
|
||||
|
||||
#### AWS
|
||||
#### AWS / OpenStack
|
||||
|
||||
```
|
||||
INTERNAL_IP=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
|
||||
|
|
|
@ -36,6 +36,13 @@ KUBERNETES_PUBLIC_ADDRESS=$(aws elb describe-load-balancers \
|
|||
--load-balancer-name kubernetes | \
|
||||
jq -r '.LoadBalancerDescriptions[].DNSName')
|
||||
```
|
||||
|
||||
#OpenStack
|
||||
|
||||
```
|
||||
KUBERNETES_PUBLIC_ADDRESS=$(openstack server show controller0 -f shell |grep addresses | awk '{print $2}'| sed 's/"$//')
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Recall the token we setup for the admin user:
|
||||
|
|
|
@ -118,3 +118,18 @@ aws ec2 create-route \
|
|||
--destination-cidr-block 10.200.2.0/24 \
|
||||
--instance-id ${WORKER_2_INSTANCE_ID}
|
||||
```
|
||||
|
||||
### OpenStack
|
||||
|
||||
```
|
||||
openstack router set --route destination=10.200.0.0/24,gateway=10.240.0.20 kubernetes
|
||||
```
|
||||
|
||||
```
|
||||
openstack router set --route destination=10.200.1.0/24,gateway=10.240.0.21 kubernetes
|
||||
```
|
||||
|
||||
```
|
||||
openstack router set --route destination=10.200.2.0/24,gateway=10.240.0.22 kubernetes
|
||||
```
|
||||
|
||||
|
|
|
@ -79,6 +79,25 @@ NODE_PUBLIC_IP=$(aws ec2 describe-instances \
|
|||
jq -j '.Reservations[].Instances[].PublicIpAddress')
|
||||
```
|
||||
|
||||
#### OpenStack
|
||||
|
||||
```
|
||||
openstack security group rule create \
|
||||
--ingress \
|
||||
--protocol tcp \
|
||||
--dst-port ${NODE_PORT} \
|
||||
--src-ip 0.0.0.0/0 \
|
||||
kubernetes
|
||||
|
||||
```
|
||||
|
||||
Add an `EXTERNAL_IP` for one of the worker nodes:
|
||||
|
||||
```
|
||||
NODE_PUBLIC_IP=169.45.x.x
|
||||
openstack server add floating ip worker0 ${NODE_PUBLIC_IP}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Test the nginx service using cURL:
|
||||
|
|
|
@ -205,3 +205,32 @@ DHCP_OPTION_SET_ID=$(aws ec2 describe-dhcp-options \
|
|||
aws ec2 delete-dhcp-options \
|
||||
--dhcp-options-id ${DHCP_OPTION_SET_ID}
|
||||
```
|
||||
|
||||
## OpenStack
|
||||
|
||||
### Virtual Machines
|
||||
|
||||
```
|
||||
openstack server delete \
|
||||
controller0 controller1 controller2 \
|
||||
worker0 worker1 worker2
|
||||
```
|
||||
|
||||
### Networking
|
||||
|
||||
```
|
||||
openstack security group delete kubernetes
|
||||
```
|
||||
|
||||
```
|
||||
openstack subnet delete kubernetes
|
||||
```
|
||||
|
||||
```
|
||||
openstack network delete kubernetes
|
||||
```
|
||||
|
||||
```
|
||||
openstack router delete kubernetes
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue