How to expose Master console through Openshift router
Environment
OpenShift Enterprise 3.1
Issue
How to make Master console reachable externally like other applications running on Openshift?
Resolution
1) Create the following three entities.
- Endpoint (Replace
IPin below example with actual IP of the master node):
{
"kind": "Endpoints",
"apiVersion": "v1",
"metadata": {
"name": "master-service"
},
"subsets": [
{
"addresses": [
{ "IP": "192.168.0.1" }
],
"ports": [
{ "port": 8443 }
]
}
]
}
- Service:
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "master-service"
},
"spec": {
"ports": [
{
"protocol": "TCP",
"port": 8443,
"targetPort": 8443
}
]
}
}
- Route (replace
hostbelow with actual one.):
{
"kind": "Route",
"apiVersion": "v1",
"metadata": {
"name": "master-service-route"
},
"spec": {
"host": "master.apps.ose3.test",
"to": {
"kind": "Service",
"name": "master-service"
},
"tls": {
"termination": "passthrough"
}
}
}
2) Modify all appearances of masterPublicURL and publicURL options in the master-config.yaml file so they conform with the domain name defined in route
3) Restart the openshift master: systemctl restart atomic-openshift-master
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments