Files
kubernetes/docs/devel
Clayton Coleman 363b616908 Expose exec and logs via WebSockets
Not all clients and systems can support SPDY protocols. This commit adds
support for two new websocket protocols, one to handle streaming of pod
logs from a pod, and the other to allow exec to be tunneled over
websocket.

Browser support for chunked encoding is still poor, and web consoles
that wish to show pod logs may need to make compromises to display the
output. The /pods/<name>/log endpoint now supports websocket upgrade to
the 'binary.k8s.io' subprotocol, which sends chunks of logs as binary to
the client. Messages are written as logs are streamed from the container
daemon, so flushing should be unaffected.

Browser support for raw communication over SDPY is not possible, and
some languages lack libraries for it and HTTP/2. The Kubelet supports
upgrade to WebSocket instead of SPDY, and will multiplex STDOUT/IN/ERR
over websockets by prepending each binary message with a single byte
representing the channel (0 for IN, 1 for OUT, and 2 for ERR). Because
framing on WebSockets suffers from head-of-line blocking, clients and
other server code should ensure that no particular stream blocks. An
alternative subprotocol 'base64.channel.k8s.io' base64 encodes the body
and uses '0'-'9' to represent the channel for ease of use in browsers.
2015-10-09 14:33:40 -04:00
..
2015-07-30 20:41:30 -04:00
2015-07-17 09:28:49 -07:00
2015-09-14 17:05:05 -07:00

WARNING WARNING WARNING WARNING WARNING

PLEASE NOTE: This document applies to the HEAD of the source tree

If you are using a released version of Kubernetes, you should refer to the docs that go with that version.

The latest 1.0.x release of this document can be found [here](http://releases.k8s.io/release-1.0/docs/devel/README.md).

Documentation for other releases can be found at releases.k8s.io.

Kubernetes Developer Guide

The developer guide is for anyone wanting to either write code which directly accesses the Kubernetes API, or to contribute directly to the Kubernetes project. It assumes some familiarity with concepts in the User Guide and the Cluster Admin Guide.

The process of developing and contributing code to the Kubernetes project

  • On Collaborative Development (collab.md): Info on pull requests and code reviews.

  • GitHub Issues (issues.md): How incoming issues are reviewed and prioritized.

  • Pull Request Process (pull-requests.md): When and why pull requests are closed.

  • Faster PR reviews (faster_reviews.md): How to get faster PR reviews.

  • Getting Recent Builds (getting-builds.md): How to get recent builds including the latest builds that pass CI.

  • Automated Tools (automation.md): Descriptions of the automation that is running on our github repository.

Setting up your dev environment, coding, and debugging

  • Development Guide (development.md): Setting up your development environment.

  • Hunting flaky tests (flaky-tests.md): We have a goal of 99.9% flake free tests. Here's how to run your tests many times.

  • Logging Conventions (logging.md]: Glog levels.

  • Profiling Kubernetes (profiling.md): How to plug in go pprof profiler to Kubernetes.

  • Instrumenting Kubernetes with a new metric (instrumentation.md): How to add a new metrics to the Kubernetes code base.

  • Coding Conventions (coding-conventions.md): Coding style advice for contributors.

Developing against the Kubernetes API

Writing plugins

Building releases

  • Making release notes (making-release-notes.md): Generating release nodes for a new release.

  • Releasing Kubernetes (releasing.md): How to create a Kubernetes release (as in version) and how the version information gets embedded into the built binaries.

Analytics