cloudflared.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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:2022.6.3
  21. args:
  22. - tunnel
  23. - --config
  24. - /etc/cloudflared/config/config.yaml
  25. - run
  26. livenessProbe:
  27. httpGet:
  28. path: /ready
  29. port: 2000
  30. failureThreshold: 1
  31. initialDelaySeconds: 10
  32. periodSeconds: 10
  33. volumeMounts:
  34. - name: config
  35. mountPath: /etc/cloudflared/config
  36. readOnly: true
  37. - name: creds
  38. mountPath: /etc/cloudflared/creds
  39. readOnly: true
  40. volumes:
  41. - name: creds
  42. secret:
  43. secretName: tunnel-credentials
  44. - name: config
  45. configMap:
  46. name: cloudflared
  47. items:
  48. - key: config.yaml
  49. path: config.yaml
  50. ---
  51. apiVersion: v1
  52. kind: ConfigMap
  53. metadata:
  54. name: cloudflared
  55. namespace: kube-system
  56. data:
  57. config.yaml: |
  58. tunnel: example-tunnel
  59. credentials-file: /etc/cloudflared/creds/credentials.json
  60. metrics: 0.0.0.0:2000
  61. ingress:
  62. - hostname: jibby.org
  63. service: http://jekyll-service.blog.svc.cluster.local:80
  64. - service: http_status:404