cloudflared.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # https://github.com/cloudflare/argo-tunnel-examples/blob/master/named-tunnel-k8s/cloudflared.yaml
  2. ---
  3. apiVersion: apps/v1
  4. kind: Deployment
  5. metadata:
  6. name: cloudflared
  7. namespace: kube-system
  8. spec:
  9. selector:
  10. matchLabels:
  11. app: cloudflared
  12. replicas: 3
  13. template:
  14. metadata:
  15. labels:
  16. app: cloudflared
  17. spec:
  18. containers:
  19. - name: cloudflared
  20. image: cloudflare/cloudflared:2023.8.2
  21. args:
  22. - tunnel
  23. - --config
  24. - /etc/cloudflared/config/config.yaml
  25. - run
  26. ports:
  27. - containerPort: 2000
  28. name: metrics
  29. livenessProbe:
  30. httpGet:
  31. path: /ready
  32. port: 2000
  33. failureThreshold: 1
  34. initialDelaySeconds: 10
  35. periodSeconds: 10
  36. volumeMounts:
  37. - name: config
  38. mountPath: /etc/cloudflared/config
  39. readOnly: true
  40. - name: creds
  41. mountPath: /etc/cloudflared/creds
  42. readOnly: true
  43. volumes:
  44. - name: creds
  45. secret:
  46. secretName: tunnel-credentials
  47. - name: config
  48. configMap:
  49. name: cloudflared
  50. items:
  51. - key: config.yaml
  52. path: config.yaml
  53. ---
  54. apiVersion: v1
  55. kind: ConfigMap
  56. metadata:
  57. name: cloudflared
  58. namespace: kube-system
  59. data:
  60. config.yaml: |
  61. tunnel: example-tunnel
  62. credentials-file: /etc/cloudflared/creds/credentials.json
  63. metrics: 0.0.0.0:2000
  64. ingress:
  65. - hostname: gogs.jibby.org
  66. service: http://gogs-service.gogs.svc.cluster.local:3000
  67. #- hostname: matrix.jibby.org
  68. # service: http://matrix-service.matrix.svc.cluster.local:8008
  69. - hostname: miniflux.jibby.org
  70. service: http://miniflux-service.miniflux.svc.cluster.local:8080
  71. - hostname: vaultwarden.jibby.org
  72. service: http://vaultwarden-service.vaultwarden.svc.cluster.local:80
  73. - hostname: vaultwarden.jibby.org
  74. path: /notifications/hub.*
  75. service: http://vaultwarden-service.vaultwarden.svc.cluster.local:3012
  76. - hostname: homeassistant.jibby.org
  77. service: http://homeassistant-service.homeassistant.svc.cluster.local:8123
  78. - hostname: ntfy.jibby.org
  79. service: http://ntfy-service.ntfy.svc.cluster.local:80
  80. # - hostname: mastodon.jibby.org
  81. # service: http://mastodon-service.mastodon.svc.cluster.local:3000
  82. # - hostname: streaming-mastodon.jibby.org
  83. # service: http://mastodon-service.mastodon.svc.cluster.local:4000
  84. - service: http_status:404