<a id="index"></a>

# Traefik operator

A [Juju](https://juju.is/) [charm](https://canonical.com/juju/docs/juju-cli/3.6/reference/charm/#charm) deploying and managing [Traefik](https://traefik.io/), an ingress
integrator and reverse proxy for Kubernetes. It is an essential part of the [COS Lite bundle](https://charmhub.io/cos-lite)
and is intended to be used together with certificates provider over the `tls-certificates` interface.

The charm provides a managed ingress entry point for applications running in your Juju model,
handling deployment, routing, configuration, TLS integration, and operational tasks specific to
Traefik. It can be composed with other operators to deliver complex applications and services.

The charm offers different kinds of ingress:

- **Ingress for each app**: This is the typical use case. The related app has only one ingress URL like `/mymodel-myapp`, and Traefik will load-balance in a round-robin fashion across all units.
- **Ingress for each unit**: Each unit of the related app obtains its own ingress URL, like `/mymodel-myapp-0`.
- **Traefik route**: This is a means to provide a fully custom ingress configuration to Traefik.

#### NOTE
Ingress is a purely in-model concern. Traefik will happily cross-model relate with your remote ingress requirers, but will be unable to actually route to them. [This is a known issue.](https://github.com/canonical/operator/issues/970)

## In this documentation

|                            |                                                                                                                                                                                                                                                                                                                             |
|----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Get started**            | [Guided tutorial](tutorial/basic-deployment/index.html.md#tutorial-basic-deployment)                                                                                                                                                                                                                                    |
| **Deployment**             | [Configure TLS termination using a local CA](how-to/tls-termination-using-a-local-ca/index.html.md#how-to-tls-termination-using-a-local-ca)                                                                                                                                                                                           |
| **Operations**             | [Troubleshoot reachability](how-to/troubleshoot-reachability/index.html.md#how-to-troubleshoot-reachability) | [Troubleshoot Gateway Address Unavailable](how-to/troubleshoot-gateway-address-unavailable/index.html.md#how-to-troubleshoot-gateway-address-unavailable) | [Upgrade](how-to/upgrade/index.html.md#how-to-upgrade) |
| **Ingress and interfaces** | [Integrate your charm with Traefik](how-to/integrate/index.html.md#how-to-integrate)                                                                                                                                                                                                                           |
| **Design**                 | [Charm architecture](reference/charm-architecture/index.html.md#reference-charm-architecture) | [How TLS works in the Traefik charm](explanation/tls/index.html.md#explanation-tls)                                                                                                                          |
| **Security**               | [Overview](explanation/security/index.html.md#explanation-security) | [Enable BasicAuth](how-to/enable-basicauth/index.html.md#how-to-enable-basicauth) | [Cryptographic documentation](reference/cryptographic-documentation-for-cos-lite-charms/index.html.md#reference-cryptographic-documentation-for-cos-lite-charms)               |

## How this documentation is organized

This documentation uses the [Diátaxis documentation structure](https://diataxis.fr/).

- The [Tutorial](tutorial/index.html.md#tutorial-index) takes you step-by-step through a basic Traefik deployment and shows how to expose a workload through ingress.
- [How-to guides](how-to/index.html.md#how-to-index) cover practical tasks for integrating applications, securing ingress, troubleshooting issues, upgrading, and contributing to the project.
- [Reference](reference/index.html.md#reference-index) provides technical details on charm architecture, ingress-related relations, and cryptographic considerations.
- [Explanation](explanation/index.html.md#explanation-index) gives background and context for security-related topics.
- [Release notes](release-notes/index.html.md#release-notes-index) track stable charm revisions, including new features, bug fixes, and compatibility notes.

## Contributing to this documentation

Documentation is an important part of this project, and we take the same open-source approach to the documentation as the code. As such, we welcome community contributions, suggestions, and constructive feedback on our documentation. See [How to contribute](how-to/contribute/index.html.md#how-to-contribute) for more information.

If there’s a particular area of documentation that you’d like to see that’s missing, please [file a bug](https://github.com/canonical/traefik-k8s-operator/issues).

## Project and community

The Traefik operator is an open source project that warmly welcomes community projects, contributions, suggestions, fixes and constructive feedback.

* [Read our Code of conduct](https://ubuntu.com/community/code-of-conduct)
* [Join the Discourse community forum](https://discourse.charmhub.io/tag/traefik)
* [Join the Matrix community chat](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)
* [Contribute](how-to/contribute/index.html.md#how-to-contribute)

Thinking about using the Traefik charm for your next project? [Get in touch!](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)
