cloudflared.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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: vaultwarden.bnuuy.org
  66. service: http://vaultwarden-service.vaultwarden.svc.cluster.local:80
  67. - hostname: vaultwarden.bnuuy.org
  68. path: /notifications/hub.*
  69. service: http://vaultwarden-service.vaultwarden.svc.cluster.local:3012
  70. - service: http_status:404