040-app.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. kind: Deployment
  2. apiVersion: apps/v1
  3. metadata:
  4. name: stilton
  5. labels:
  6. app: cheese
  7. cheese: stilton
  8. spec:
  9. replicas: 2
  10. selector:
  11. matchLabels:
  12. app: cheese
  13. task: stilton
  14. template:
  15. metadata:
  16. labels:
  17. app: cheese
  18. task: stilton
  19. version: v0.0.1
  20. spec:
  21. containers:
  22. - name: cheese
  23. image: eugeniucarvalho1/teste:0.0.1
  24. ports:
  25. - containerPort: 8000
  26. ---
  27. apiVersion: v1
  28. kind: Service
  29. metadata:
  30. name: stilton
  31. spec:
  32. ports:
  33. - name: http
  34. targetPort: 8000
  35. port: 80
  36. selector:
  37. app: cheese
  38. task: stilton
  39. ---
  40. apiVersion: v1
  41. kind: Secret
  42. metadata:
  43. name: supersecret
  44. data:
  45. tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
  46. tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
  47. ---
  48. kind: Ingress
  49. apiVersion: networking.k8s.io/v1beta1
  50. metadata:
  51. name: cheese
  52. annotations:
  53. traefik.ingress.kubernetes.io/router.entrypoints: websecure
  54. traefik.ingress.kubernetes.io/router.tls: "true"
  55. spec:
  56. tls:
  57. - secretName: supersecret
  58. rules:
  59. - host: traefik.eugeniocarvalho.dev
  60. http:
  61. paths:
  62. - path: ""
  63. backend:
  64. serviceName: stilton
  65. servicePort: http