Traefik Ingress Operator for Kubernetes
- Canonical Observability
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 203 | 03 Dec 2024 | |
latest/candidate | 218 | 03 Dec 2024 | |
latest/beta | 223 | 03 Dec 2024 | |
latest/edge | 226 | 11 Dec 2024 | |
1.0/stable | 164 | 16 Feb 2024 | |
1.0/candidate | 164 | 22 Nov 2023 | |
1.0/beta | 164 | 22 Nov 2023 | |
1.0/edge | 164 | 22 Nov 2023 |
juju deploy traefik-k8s
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
This feature is available in traefik-k8s starting from revision 206.
In order to enable BasicAuth in traefik-k8s
you will need to:
Generate a user string
First you will need to generate a user string with the right format:
<username>:<hashed-password>
where the password must be hashed with either MD5, SHA1, or BCrypt.
We recommend using htpasswd
to generate the user string:
(on ubuntu)
$ sudo apt-get install apache2-utils
$ htpasswd -nbB YOUR_USERNAME YOUR_PASSWORD
For example, running with `admin/admin:
$ htpasswd -nbB admin admin
admin:$2y$05$ChsVYFWoLO7YbNnRZSS2IeLcKzL1jgfdOdCfyhtz4tcPOvmTkQYPy
TIP: Use a strong password.
Pass the user string to traefik-k8s
$ juju config traefik-k8s basic_auth_user='<YOUR_USER_STRING>'
Remember to escape the user string! The hash can contain some odd characters that may confuse your shell.
Wait for traefik to process the action and ta-da! you should now have enabled BasicAuth. Any url you try to access through this traefik instance will request the username/password combination you chose.
We don’t yet support multiple users or per-route auth. Need that? Let us know! For the time being, you can consider deploying multiple traefik
s to segment your namespace with separate user domains.