Skip to main content
Version: Early Access

Set up Custom Context Root

This topic illustrates on how to set up the custom context root on the Deploy. We can change the setup of the default context root / to the custom one, for example here: /xld-root.

How to Set up Custom Context Root

  1. Update the Deploy CR yaml file by running the following command:
kubectl patch -n digitalai digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch '{"spec": {"appContextRoot": "/xld-root"}}'

Note: The custom context root must start with /.

  1. To apply the changes, restart the Deploy pods.
kubectl delete sts dai-xld-digitalai-deploy-master -n digitalai
kubectl delete sts dai-xld-digitalai-deploy-worker -n digitalai
  1. The CR yaml file will now have a new appContextRoot value.
kubectl get Digitalaideploys dai-xld -n digitalai -o jsonpath='{.spec.appContextRoot}'
  1. The restarted pod process on master will now use the new context root. To check that run with following command:
kubectl port-forward svc/dai-xld-digitalai-deploy-lb 4516:80 -n digitalai
  1. Login to Deploy with the following URL.
http://localhost:4516/xld-root

Note: In case you are using the ingress, you can access Deploy by using the Ingress hostname.

kubectl get ingress dai-xld-digitalai-deploy -o jsonpath='{.spec.rules[*].host}'

The URL for Ingress will be as follows:

http://$ingressHostname/xld-root