Show HN: Apf – a small tool that exposes container’s ports automatically

Show HN: Apf – a small tool that exposes container’s ports automatically

A at hand instrument to robotically position up proxies that train the far-off container’s listening ports
again to the local machine. Appropriate adore kubectl portforward or docker poke -p LOCAL:REMOTE, but
robotically analysis and change the ports to be forwarded on the wing.

I in most cases catch myself forgot to add -p possibility when making an strive out a say with docker, or disregarded to
train some different ports. Now I don’t wish to grief about that, I correct poke the following instructions:

server:most up-to-the-minute $ apf ch LISTENING PORTS: [9005 ==> 9005, 9009 ==> 9009, 8123 ==> 8123, 9000 ==> 9000, 9004 ==> 9004]

apf will change the port list on the wing. So need to you login to the container and originate different
server listening on different ports, it goes to dynamically change the local listeners.

For kubernetes:

$ kubectl poke --say redis redis

$ apf -k default/redis
LISTENING PORTS: [6379 ==> 6379]


Initially, apf requires a working docker / kubectl client setup, the shopper can conect to both
local docker daemon / k8s cluster or far-off.

It is seemingly you’ll perhaps possibly possibly both download the binary from the open artifacts or set up it your self.

# MacOS (intel)
curl -L -O
chmod +x apf-mac
mv apf-mac /usr/local/bin/apf

# Linux
curl -L -O
chmod +x apf-mac
mv apf-mac /usr/local/bin/apf

To manually set up it, clone the repo and poke the set script.


# Docker
apf {container ID / title}

# Kubernetes
apf -k {namespace}/{pod title}

Web hiss

  • Supporting for reverse proxy is in growth: Construct listening ports in container and ahead them ba

Be a part of the pack! Be a part of 8000+ others registered customers, and procure chat, plan groups, post updates and plan pals all the intention via the sector!

Ava Chan

Ava Chan

I'm a researcher at Utokyo :) and a big fan of Ava Max