Skip to content

Instantly share code, notes, and snippets.

@cmer81
Last active July 31, 2024 00:23
Show Gist options
  • Save cmer81/a832b785677a4b80b39445ea5cec6dea to your computer and use it in GitHub Desktop.
Save cmer81/a832b785677a4b80b39445ea5cec6dea to your computer and use it in GitHub Desktop.
Cloudflare Treafik manifests for rancher k3s
apiVersion: k3s.cattle.io/v1
kind: HelmChart
metadata:
name: traefik
namespace: kube-system
spec:
chart: https://%{KUBERNETES_API}%/static/charts/traefik-1.64.0.tgz
set:
rbac.enabled: "true"
ssl.enabled: "true"
metrics.prometheus.enabled: "true"
kubernetes.ingressEndpoint.hostname: "mydomain.com"
ssl.enforced: "true"
ssl.permanentRedirect: "true"
valuesContent: |-
acme:
enabled: true
email: YOUR-MAIL
staging: false
challengeType: dns-01
dnsProvider:
name: cloudflare
cloudflare:
CLOUDFLARE_EMAIL: YOUR-MAIL
CLOUDFLARE_API_KEY: YOUR-API-KEY
domains:
enabled: true
domainsList:
- main: "*.mydomain.com"
- sans:
- "mydomain.com"
resolvers:
- 1.1.1.1:53
- 8.8.8.8:53
dashboard:
enabled: true
domain: "traefik.mydomain.com"
auth:
basic:
admin: (YOUR-PASSWORD "exemple htpasswd -c auth admin")
@cmer81
Copy link
Author

cmer81 commented Apr 30, 2019

For use this configuration, please lunch k3s server with --no-deploy traefik argument and install this file in your manifest repertory.
example for ubuntu: /var/lib/rancher/k3s/server/manifests/traefik.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment