Matir / podperconn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PodPerConn

Pod Per Conn accepts an incoming connection and spawns a new pod, then forwards the connection to the new pod.

This is forwarded as a basic TCP forwarder without regard to the underlying protocol.

Copyright

Copyright 2022 Google LLC. This is not an official Google Product.

Design

Initial Setup

  1. Load template Deployment.
  2. Verify connectivity to k8s cluster.
  3. Start listening for connections.

Per-Connection

  1. Accept incoming connection.
  2. Attempt spawning a new pod that exposes exactly one port.
  3. Start forwarding traffic to port on new pod.
  4. On connection close, shut down deployment and close remaining connection.

Resources

About

License:Apache License 2.0


Languages

Language:Go 96.1%Language:Shell 2.5%Language:Dockerfile 1.4%