Getting Started

Prerequisites

  • Python 3.11 or later

Installation

Using uv (for development)

# Install uv if not already installed
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone the repository
git clone https://github.com/pmady/ingress2gateway.git
cd ingress2gateway

# Install dependencies
uv sync

From source

# Clone the repository
git clone https://github.com/pmady/ingress2gateway.git
cd ingress2gateway

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install the package
pip install -e .

Quick Start

CLI

# Convert Ingress to Gateway API
i2g convert ingress.yaml -o gateway.yaml

# With provider preset
i2g convert ingress.yaml -o gateway.yaml -p istio

# Reverse conversion
i2g reverse gateway.yaml -o ingress.yaml

# Validate
i2g validate ingress.yaml

# List providers
i2g providers

# Start web server
i2g serve --port 8000

Web UI

Start the server and open your browser:

i2g serve --port 8000

Then navigate to http://localhost:8000

Python API

from ingress2gateway import (
    convert_ingress_to_gateway,
    parse_ingress,
    resources_to_yaml,
)

# Load and parse Ingress YAML
with open("ingress.yaml") as f:
    ingress = parse_ingress(f.read())

# Convert to Gateway API
resources = convert_ingress_to_gateway(ingress)

# Output as YAML
print(resources_to_yaml(resources))

Verify Installation

CLI

ingress2gateway --help

Web Server

Once the server is running, open your browser and navigate to:

Next Steps