Getting Started
Ingress is a powerful, flexible reverse proxy that makes it easy to route traffic to your backend services. This guide will help you get started with Ingress.
Installation
Using Go Install
The easiest way to install Ingress is using go install:
go install github.com/go-zoox/ingress@latestThis will install the ingress binary to your $GOPATH/bin directory (or $GOBIN if set).
Using Docker
You can also run Ingress using Docker:
docker run -d \
-p 8080:8080 \
-v /path/to/ingress.yaml:/etc/ingress/config.yaml \
gozoox/ingress:latestBuilding from Source
If you want to build from source:
git clone https://github.com/go-zoox/ingress.git
cd ingress
go build -o ingress ./cmd/ingressQuick Start
1. Create a Configuration File
Create a file named ingress.yaml:
version: v1
port: 8080
rules:
- host: example.com
backend:
service:
name: backend-service
port: 80802. Start the Server
Start Ingress with your configuration:
ingress run -c ingress.yamlOr use the default configuration path:
ingress runThe default configuration path is /etc/ingress/ingress.yaml if no config file is specified.
3. Test the Setup
Once Ingress is running, you can test it by making a request:
curl -H "Host: example.com" http://localhost:8080Command Line Options
Run Command
ingress run [options]Options:
-c, --config <path>: Path to the configuration file-p, --port <port>: Override the port from configuration--pid-file <path>: Path to the PID file (default:/tmp/gozoox.ingress.pid)
Reload Command
Reload the configuration without restarting:
ingress reloadOr send a SIGHUP signal to the running process:
kill -HUP $(cat /tmp/gozoox.ingress.pid)Configuration File Location
Ingress looks for configuration files in the following order:
- Path specified by
-cor--configflag - Environment variable
CONFIG - Default path:
/etc/ingress/ingress.yaml
Next Steps
- Learn about Configuration options
- Explore Routing capabilities
- Set up Authentication
- Configure SSL/TLS