29 lines
876 B
Markdown
29 lines
876 B
Markdown
# Traefik Helper (for Kubernetes)
|
|
|
|
This is a helper for [Traefik](https://traefik.io/) on Kubernetes. It allows you to add and delete services from a simple cli.
|
|
|
|
## Todo
|
|
|
|
- [ ] Use the Traefik api to list all services
|
|
|
|
## Windows Alias
|
|
|
|
Ensure you have ran `Set-ExecutionPolicy Unrestricted` in PowerShell as an administrator.
|
|
|
|
Create the directory `~/Documents/WindowsPowerShell` and create a file called `traefik.kubernetes.ps1` in that directory. Add the following code to the file.
|
|
|
|
```bash
|
|
function Traefik-Helper {
|
|
$argsAsString = $args -join ' '
|
|
|
|
$command = "projectlocation/traefik-helper-kubernetes/.venv/Scripts/python.exe projectlocation/traefik-helper-kubernetes/app.py $argsAsString"
|
|
|
|
Invoke-Expression $command
|
|
}
|
|
|
|
# Set the alias
|
|
Set-Alias -Name "traefik" -Value "Traefik-Helper"
|
|
```
|
|
|
|
This will allow you to run the `traefik` command in PowerShell.
|