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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68053402117eec0cbda1677e82e06d7d12a5b291760a03bacad61b01624e8428
|
|
| MD5 |
787cc4b644b7814ddc897d7c3b18d761
|
|
| BLAKE2b-256 |
83070c09113678a814f2801805139eba72525b23534d018e3d0f0227de032919
|
Provenance
The following attestation bundles were made for azaks_bastion-0.1.0.tar.gz:
Publisher:
release.yml on NaeemH/azaks-bastion
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
azaks_bastion-0.1.0.tar.gz -
Subject digest:
68053402117eec0cbda1677e82e06d7d12a5b291760a03bacad61b01624e8428 - Sigstore transparency entry: 1984045055
- Sigstore integration time:
-
Permalink:
NaeemH/azaks-bastion@87d963070372b32954ea9ac3ea5f0c4507bba353 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NaeemH
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@87d963070372b32954ea9ac3ea5f0c4507bba353 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac1c15eacd63beed6f2e62d1038f0ddb01a7528c733c915bb42a8cebabb42771
|
|
| MD5 |
f9e350cd5a83ceb9a17e59f2d045518d
|
|
| BLAKE2b-256 |
cb521bee42ab1bba82474dd7dde8b9f6d532f7b9887accc6da476989af3e7373
|
Provenance
The following attestation bundles were made for azaks_bastion-0.1.0-py3-none-any.whl:
Publisher:
release.yml on NaeemH/azaks-bastion
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
azaks_bastion-0.1.0-py3-none-any.whl -
Subject digest:
ac1c15eacd63beed6f2e62d1038f0ddb01a7528c733c915bb42a8cebabb42771 - Sigstore transparency entry: 1984045217
- Sigstore integration time:
-
Permalink:
NaeemH/azaks-bastion@87d963070372b32954ea9ac3ea5f0c4507bba353 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NaeemH
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@87d963070372b32954ea9ac3ea5f0c4507bba353 -
Trigger Event:
push
-
Statement type: