Configuring Hostname and URL-based Routing for Ingress
This section describes how to use the Fully Qualified Domain Names (FQDN) and path-based URL routing to connect to an ops-center.
Note | The hostname and url path-based routing for the ingress ip_address in the nip.io format is not supported. |
Prerequisites
-
The DNS hosts and zones must be configured before configuring the hostname and URL path-based routing.
-
Run the
get ingress -A
command to check for the ingress created after the SMI cluster deployment.kubectl get ingresses -A NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE cee-global cee-global-product-documentation-ingress <none> docs.cee-global-product-documentation.192.22.46.40.nip.io 192.22.46.40 80, 443 28m cee-global cli-ingress-cee-global-ops-center <none> cli.cee-global-ops-center.192.22.46.40.nip.io 192.22.46.40 80, 443 32m cee-global documentation-ingress <none> documentation.cee-global-ops-center.192.22.46.40.nip.io 192.22.46.40 80, 443 32m cee-global grafana-ingress <none> grafana.192.22.46.40.nip.io 192.22.46.40 80, 443 28m cee-global restconf-ingress-cee-global-ops-center <none> restconf.cee-global-ops-center.192.22.46.40.nip.io 192.22.46.40 80, 443 32m cee-global show-tac-manager-ingress <none> show-tac-manager.192.22.46.40.nip.io 192.22.46.40 80, 443 28m registry charts-ingress <none> charts.192.22.46.40.nip.io 192.22.46.40 80, 443 34m registry registry-ingress <none> docker.192.22.46.40.nip.io 192.22.46.40 80, 443 34m smi-cm cluster-files-offline-smi-cluster-deployer <none> files-offline.smi-cluster-deployer.192.22.46.40.nip.io 192.22.46.40 80, 443 32m smi-cm ops-center-cli-smi-cluster-deployer <none> cli.smi-cluster-deployer.192.22.46.40.nip.io 192.22.46.40 80, 443 32m smi-cm ops-center-restconf-smi-cluster-deployer <none> restconf.smi-cluster-deployer.192.22.46.40.nip.io 192.22.46.40 80, 443 32m
-
Assign a hostname to the ingress; Here, the hostname demo-host-aio.smi-dev.com is assigned to the ingress in cee global ops-centers. Apply the following changes and run the synchronization.
clusters demo-host-aio addons distributed-registry ingress-hostname demo-host-aio.smi-dev.com cluster-manager ingress-hostname demo-host-aio.smi-dev.com ops-centers cee global ingress-hostname demo-host-aio.smi-dev.com exit exit
The ingress values are updated:
kubectl get ingresses -A NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE cee-global cee-global-product-documentation-ingress <none> docs.cee-global-product-documentation.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 49m cee-global cli-ingress-cee-global-ops-center <none> cli.cee-global-ops-center.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 53m cee-global documentation-ingress <none> documentation.cee-global-ops-center.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 53m cee-global grafana-ingress <none> grafana.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 49m cee-global restconf-ingress-cee-global-ops-center <none> restconf.cee-global-ops-center.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 53m cee-global show-tac-manager-ingress <none> show-tac-manager.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 49m registry charts-ingress <none> charts.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 56m registry registry-ingress <none> docker.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 56m smi-cm cluster-files-offline-smi-cluster-deployer <none> files-offline.smi-cluster-deployer.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 53m smi-cm ops-center-cli-smi-cluster-deployer <none> cli.smi-cluster-deployer.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 53m smi-cm ops-center-restconf-smi-cluster-deployer <none> restconf.smi-cluster-deployer.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 53m cloud-user@cndp-cm-sa-control-plane:~$
-
To configure the URL path, set the path-based-ingress parameter to true as shown, and run the synchronization again:
clusters demo-host-aio addons distributed-registry ingress-hostname demo-host-aio.smi-dev.com cluster-manager ingress-hostname demo-host-aio.smi-dev.com ops-centers cee global ingress-hostname demo-host-aio.smi-dev.com initial-boot-parameters path-based-ingress true exit exit
After running the synchronization, the ingress hostname and URL path are assigned.
The cee-global ingress shows * for the hostname, which means, the ops-center functions are now accessible through the URL path.
kubectl get ingresses -A NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE cee-global cee-global-product-documentation-ingress <none> * 192.22.46.40 80, 443 20m cee-global cli-ingress-cee-global-ops-center <none> * 192.22.46.40 80, 443 24m cee-global documentation-ingress <none> * 192.22.46.40 80, 443 24m cee-global grafana-ingress <none> * 192.22.46.40 80, 443 20m cee-global restconf-ingress-cee-global-ops-center <none> * 192.22.46.40 80, 443 24m cee-global show-tac-manager-ingress <none> * 192.22.46.40 80, 443 20m registry charts-ingress <none> charts.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 27m registry registry-ingress <none> docker.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 27m smi-cm cluster-files-offline-smi-cluster-deployer <none> files-offline.smi-cluster-deployer.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 24m smi-cm ops-center-cli-smi-cluster-deployer <none> cli.smi-cluster-deployer.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 24m smi-cm ops-center-restconf-smi-cluster-deployer <none> restconf.smi-cluster-deployer.demo-host-aio.smi-dev.com 192.22.46.40 80, 443 24m
The following table shows the old path and the new path accessible through the URL.
Old Path |
New Path |
---|---|
https://cli.smi-cluster-deployer.192.22.46.40.nip.io |
https://cli.smi-cluster-deployer.demo-host-aio.smi-dev.com |
https://cli.cee-global-ops-center.192.22.46.40.nip.io |
https://demo-host-aio.smi-dev.com/cee-global/cli/ |
https://documentation.cee-global-ops-center.192.22.46.40.nip.io |
https://demo-host-aio.smi-dev.com/cee-global/docs/ |
https://grafana.192.22.46.40.nip.io |
https://demo-host-aio.smi-dev.com/cee-global/grafana/ |
https://show-tac-manager.192.22.46.40.nip.io |
https://demo-host-aio.smi-dev.com/cee-global/show-tac-manager/ |