Skip to content

Add a client for the pod read-log endpoint #82

Closed
@dbolkensteyn

Description

@dbolkensteyn

Command-line: kubectl log <pod-name>
Documentation: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#read-log-pod-v1-core

From what I read so far on kubernetes/kubernetes#13885, the /log endpoints only expects binary.k8s.io as protocol. Without it (but still sending the *.channel.k8s.io ones), a 403 Forbidden status code is returned.

I'll try to submit a PR for this in the upcoming days, suggestions are welcome.

Right now I'm trying to fit this into WebSocketHandler, but there is already a binary handler that expects the first byte of the message to be the channel number, which is not the case for the /log endpoint. See https://github.com/kubernetes-client/javascript/blob/master/node-client/src/web-socket-handler.ts#L89-L94

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions