Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debugging: remove old (now misleading) example #3487

Merged
merged 2 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 1 addition & 44 deletions docs/source/administrator/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,6 @@ settings for the pod. The final section you'll see is a list of recent
events. These can be particularly informative, as often an error will
show up in this section.

**Real world scenario:** In our case, one of the lines in the events page
displays an error:

```
$ kubectl describe pod jupyter-choldgraf --namespace <k8s-namespace>
...
2m 52s 4 kubelet, gke-jhubtest-default-pool-52c36683-jv6r spec.containers{notebook} Warning Failed Failed to pull image "jupyter/scipy-notebook:v0.4": rpc error: code = 2 desc = Error response from daemon: {"message":"manifest for jupyter/scipy-notebook:v0.4 not found"}
...
```

It seems there is indeed something wrong with the Docker image. Let's confirm
this by getting another view on the events that have transpired in the pod.

### `kubectl logs`

If you only want to see the latest logs for a pod, use the following command:
Expand All @@ -99,37 +86,7 @@ This will show you the logs from the pod, which often contain useful
information about what is going wrong. Parse these logs
to see if something is generating an error.

**Real world scenario:** In our case, we get this line back:

```
$ kubectl logs jupyter-choldgraf --namespace <k8s-namespace>
Error from server (BadRequest): container "notebook" in pod "jupyter-choldgraf" is waiting to start: trying and failing to pull image
```

Now we are sure that something is wrong with our Dockerfile. Let's check
our `config.yaml` file for the section where we specify the user's
Docker image. Here we see our problem:

```yaml
singleuser:
image:
name: jupyter/scipy-notebook
```

We haven't specified a `tag` for our Docker image! Not specifying a tag
will cause it to default to `v0.4`, which isn't what we want and is causing
the pod to fail.

To fix this, let's add a tag to our `config.yaml` file:

```yaml
singleuser:
image:
name: jupyter/scipy-notebook
tag: ae885c0a6226
```

Then run a helm upgrade:
When you have identified the error edit your `config.yaml` if necessary, then run a helm upgrade:

```
helm upgrade --cleanup-on-fail jhub jupyterhub/jupyterhub --version=<chart-version> -f config.yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/source/kubernetes/microsoft/step-zero-azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ If you prefer to use the Azure portal see the [Azure Kubernetes Service quicksta

**Both** `--min-count` and `--max-count` must be defined.

Read more about available options for the autoscaler [here](https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/aks/cluster-autoscaler.md).
Read more about available options for the autoscaler [here](https://learn.microsoft.com/en-us/azure/aks/cluster-autoscaler?tabs=azure-cli).

8. If you're using the Azure CLI locally, install [kubectl](https://kubernetes.io/docs/reference/kubectl/), a tool
for accessing the Kubernetes API from the commandline:
Expand Down