Get more information about the running service or process that you are developing

When developing your service or process on EDITO, you might run into some unexpected behavior for your chart. From the EDITO datalab UI, you can easily access your namespace events by clicking on the “Events” button from “My services” or “My processes”, and a running service logs by clicking on the name on its tile in “My services”.

Still, to understand better what is going on under the hood, you can also run some commands from inside a service that could help you. We will show some basic examples, but you can always learn more in the official Kubernetes documentation.

To do so, you need a terminal on EDITO with the “edit” or “admin” Kubernetes roles; for example, you can launch a Jupyter-python with “edit” role.

First, you can start by listing the pods running in your namespace:

kubectl get pods

Then, you can print a detailed description of a selected pod by running:

kubectl describe pods/my-pod-xxxxxx-x

It can be useful if your pod does not start.

If your pod has started, you can get its logs by running:

kubectl logs my-pod-xxxxxx-x --all-containers=true

NOTE: You can use the --container container-name option to target a specific container.

Sometimes logs cannot be enough, and you would want to run commands directly on your container. This is possible with the kubectl exec command. To get a shell in your running container, simply run:

kubectl exec --stdin --tty my-pod -- /bin/bash

NOTE: This assume bash is available in your container, but any other available shell would work.

If your service/process won’t launch from the datalab

You might run into an issue where your service/process won’t launch from the datalab, without an explicit error to debug.

If you cannot even access the launcher page of your service/process, you probably have a malformed chart. You can try to open the debug console of your browser which might hint you where the error might be.

If you can access the launcher page but cannot launch your service/process, you might try to manually install your chart. First, you need a terminal on EDITO with the “edit” or “admin” Kubernetes roles; for example, you can launch a Jupyter-python with “edit” role. Then, you can go on the launcher page of the service/process you are developing and expand the command bar showing Helm commands. There should be three commands: - The first one to add the Helm repository, starting with helm repo add ... - The second one creating a file with your values, starting with cat <<EOF > ./values.yaml ... - The last one installing your chart, starting with helm install ... Copy and run those three commands in the Jupyter-python terminal, and the last one should give you a better hint as to why your service/process is crashing.