Run Diagnostic Mode
This topic illustrates how to use the diagnostic mode in Deploy.
Note: Sometimes, the application PODs do not start because of misconfiguration or some other problem during application startup in the application’s container. To overcome this, you can use the diagnostic mode. This will not start the actual application process, instead will use a dummy sleep infinity process.
Steps to Configure Diagnostic Mode
- Update the Deploy CR yaml file by running the following command:
Central configuration
kubectl patch -n digitalai digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch '{"spec": {"centralConfiguration": {"diagnosticMode": {"enabled": true}}}}'
Master
kubectl patch -n digitalai digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch '{"spec": {"master": {"diagnosticMode": {"enabled": true}}}}'
Worker
kubectl patch -n digitalai digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch '{"spec": {"worker": {"diagnosticMode": {"enabled": true}}}}'
- Restart the Deploy pods.
kubectl delete sts dai-xld-digitalai-deploy-master -n digitalai
kubectl delete sts dai-xld-digitalai-deploy-worker -n digitalai
- The CR yaml file will now have a new
diagnosticMode
section.
kubectl get Digitalaideploys dai-xld -n digitalai -o jsonpath='{.spec.centralConfiguration.diagnosticMode}'
kubectl get Digitalaideploys dai-xld -n digitalai -o jsonpath='{.spec.master.diagnosticMode}'
kubectl get Digitalaideploys dai-xld -n digitalai -o jsonpath='{.spec.worker.diagnosticMode}'
- The restarted pod process will be in sleep mode.
You can ssh into the application's container and check the content.
To return to the standard application setup, toggle the
diagnosticMode
tofalse
.