Skip to content

A simple Container build of Postgres in Alpine with both the netcat and curl command. This container is mainly used for showing NetworkPolicy demo's.

License

Notifications You must be signed in to change notification settings

MichaelTrip/postgres-nc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Author

Build status GitHub License GitHub last commit GitHub tag (with filter)

postgres-nc Container

Purpose

I have created this container to have a working version of Netcat inside a Postgresql container. The main purpose is to test various network policies against this container.

Docker

$ docker run -it --rm -p 5432:5432 ghcr.io/michaeltrip/postgres-nc:latest

Podman

$ podman run -it --rm -p 5432:5432 ghcr.io/michaeltrip/postgres-nc:latest

Kubernetes

I have created two seperate deployments, a postgres deployment with a service object running on port 8080 and a "pretending to be" postgresql container with this image with a service object running on 5432. This to simulate a network connection between those two.

After that, i can execute a shell into the nginx container and test the network connectitivy with the nc command: nc -zv postgresql.postgresql 5432, or with the curl command: curl http://postgresql.postgresql:5432.

About

A simple Container build of Postgres in Alpine with both the netcat and curl command. This container is mainly used for showing NetworkPolicy demo's.

Resources

License

Stars

Watchers

Forks

Packages