InseeFrLab / InseeFrLab/onyxia
Streaming events for pod with container not initialized
- Dominant language
- TypeScript
- Stars
- 872
- Forks
- 109
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 1
Description
Hi,
We have trouble getting logs from the `api/my-lab/app/logs` endpoint, where the targeted pod has multiple containers, and one of them is not yet initialized. We get a error 500 and the onyxia API pod logs:
> io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://10.254.0.1:443/api/v1/namespaces/user-XXX/pods/marine-plastic-exposure-257003-wh2zv/log?pretty=false. Message: container "copy-output" in pod "marine-plastic-exposure-257003-wh2zv" is waiting to start: PodInitializing. Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=container "copy-output" in pod "marine-plastic-exposure-257003-wh2zv" is waiting to start: PodInitializing, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).
It is understandable as the `kubectl logs my_pod` command requires to specify a container if my_pod has more than one, or you can also use the `--all-containers` flag. I tried to look into the fabric8's `getLog()` method but Java is not my specialty so I have no fix to propose.
Also, please note that it would be very useful for us to have access to every log available even if some containers are not yet initialized.
Thanks in advance!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.