Maintained and created by Alan Groves
Before proceeding please ensure you have all the requirements below
- OpenStack command-line client. how-to...
- Authenticated to OpenStack API endpoints test example:
$ openstack server list --minimal
+--------------------------------------+----------------------------+
| ID | Name |
+--------------------------------------+----------------------------+
| fac1dfcb-4ce6-45df-8614-5d996dd102d8 | dev-instance |
+--------------------------------------+----------------------------+
- Terraform Installed how-to...
- Update the variables file
- Ensure you have allowed internet traffic from the jump-box and 192.168.207.0/24 subnet
- Ensure there is a host route on the DMZ subnet eg: destination='192.168.207.0/24', gateway='172.31.255.207'
- Ensure you have the same static route on the firewall
- Ensure you have allowed SSH access to the jump-box eg: 172.16.0.207
- If you add addional worker nodes be sure to update the hosts.ini file
Fetch the nodes and services in the namespace
$ kubectl -n kube-system get nodes
$ kubectl -n kube-system get services
Note: The config file can be found on the first master node in the following dir /root/.kube/config
graph TD
subgraph Existing DMZ Network
C[k8s-jump]
end
subgraph
C--Router DMZ Interface 172.16.0.207--> D((Router))
end
subgraph k8s_POC_network 192.168.207.0/24
subgraph Master Nodes + etcd
D -- Router Interface 192.168.207.1 --> F[k8s-master-node-1]
H[k8s-master-node-2]
I[k8s-master-node-3]
end
subgraph Worker Nodes
F-->J(k8s-worker-node-1)
F-->K(k8s-worker-node-2)
F-->L(k8s-worker-node-3)
end
end
If you want to use the dashboard follow these instructions
- SSH to the master node
- Run the following command
vi kube-dashboard-access.yaml- Copy/Paste the following into the file (edit the file by pressing 'i')
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubernetes-dashboard
labels:
k8s-app: kubernetes-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: kubernetes-dashboard
namespace: kube-system
- Save and close the file ('ctrl + [' then ':qw')
- Run the following command
kubectl create -f kube-dashboard-access.yaml- Dashboard is now published on the master node
https://<first_master>:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login