Skip to main content

Open an Azure Bastion tunnel to a private AKS API server or jump host.

Project description

azaks-bastion

Open an Azure Bastion tunnel to a private AKS API server or jump host.

Install

pip install azaks-bastion

The package installs two console scripts that point at the same Typer app:

Command Use when
azaks-bastion Long form, friendly for scripts
aksb Short alias for interactive shell use

Usage

aksb --help
aksb --version

Discover Bastion hosts

# Table of Bastion hosts in the current subscription
aksb list

# Machine-readable, never truncated (good for scripts / piping)
aksb list --json
aksb list -s my-subscription

Open a tunnel to a private AKS jump host or API server

aksb tunnel wraps az network bastion tunnel, forwarding a local port to a target's port through a Standard-SKU Bastion host. The target may be a full ARM resource id or a VM name (with --target-rg).

# SSH jump host: forward an OS-assigned local port to the VM's port 22
aksb tunnel --bastion prod-hub-bastion --bastion-rg prod-hub-neu-rg \
            --target jump-vm --target-rg prod-jump-rg

# Private API server: pin a local port and forward to 443
aksb tunnel -b prod-hub-bastion --bastion-rg prod-hub-neu-rg \
            -t /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.Compute/virtualMachines/jump \
            --resource-port 443 --local-port 8443

The command runs in the foreground and prints the local endpoint (127.0.0.1:<port>); press Ctrl-C to close the tunnel.

Development

git clone https://github.com/NaeemH/azaks-bastion.git
cd azaks-bastion
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pre-commit install

# Run the standard checks
ruff check . && ruff format --check .
mypy src
pytest -q

Release

Releases are tag-driven. Bump src/azaks_bastion/__about__.py, commit, then:

git tag v0.1.0
git push origin v0.1.0

.github/workflows/release.yml builds the sdist + wheel and publishes to PyPI via Trusted Publishers (OIDC) — no API tokens involved.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azaks_bastion-0.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

azaks_bastion-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file azaks_bastion-0.1.0.tar.gz.

File metadata

  • Download URL: azaks_bastion-0.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for azaks_bastion-0.1.0.tar.gz
Algorithm Hash digest
SHA256 68053402117eec0cbda1677e82e06d7d12a5b291760a03bacad61b01624e8428
MD5 787cc4b644b7814ddc897d7c3b18d761
BLAKE2b-256 83070c09113678a814f2801805139eba72525b23534d018e3d0f0227de032919

See more details on using hashes here.

Provenance

The following attestation bundles were made for azaks_bastion-0.1.0.tar.gz:

Publisher: release.yml on NaeemH/azaks-bastion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file azaks_bastion-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: azaks_bastion-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for azaks_bastion-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac1c15eacd63beed6f2e62d1038f0ddb01a7528c733c915bb42a8cebabb42771
MD5 f9e350cd5a83ceb9a17e59f2d045518d
BLAKE2b-256 cb521bee42ab1bba82474dd7dde8b9f6d532f7b9887accc6da476989af3e7373

See more details on using hashes here.

Provenance

The following attestation bundles were made for azaks_bastion-0.1.0-py3-none-any.whl:

Publisher: release.yml on NaeemH/azaks-bastion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page