nginx.yml 852 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: nginx-deployment
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: nginx
  9. replicas: 2
  10. template:
  11. metadata:
  12. labels:
  13. app: nginx
  14. spec:
  15. containers:
  16. - name: nginx
  17. image: nginx:1.19.0
  18. ports:
  19. - containerPort: 80
  20. ---
  21. apiVersion: v1
  22. kind: Service
  23. metadata:
  24. name: nginx-svc
  25. spec:
  26. ports:
  27. - port: 80
  28. selector:
  29. app: nginx
  30. ---
  31. apiVersion: extensions/v1beta1
  32. kind: Ingress
  33. metadata:
  34. name: nginx-ingress
  35. annotations:
  36. kubernetes.io/ingress.class: "nginx"
  37. cert-manager.io/issuer: "letest-issuer"
  38. spec:
  39. tls:
  40. - hosts:
  41. - letest.infoclinica.ru
  42. secretName: letest-tls
  43. rules:
  44. - host: letest.infoclinica.ru
  45. http:
  46. paths:
  47. - path: /
  48. backend:
  49. serviceName: nginx-svc
  50. servicePort: 80