nginx.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ---
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: nginx-acme
  6. data:
  7. index.html: |
  8. ACME-DNS
  9. ---
  10. apiVersion: apps/v1
  11. kind: Deployment
  12. metadata:
  13. name: nginx-deployment
  14. spec:
  15. selector:
  16. matchLabels:
  17. app: nginx
  18. replicas: 2
  19. template:
  20. metadata:
  21. labels:
  22. app: nginx
  23. spec:
  24. containers:
  25. - name: nginx
  26. image: nginx:1.19.0
  27. ports:
  28. - containerPort: 80
  29. volumeMounts:
  30. - mountPath: /usr/share/nginx/html
  31. name: homepage
  32. volumes:
  33. - name: homepage
  34. configMap:
  35. name: nginx-acme
  36. ---
  37. apiVersion: v1
  38. kind: Service
  39. metadata:
  40. name: nginx-svc
  41. spec:
  42. ports:
  43. - port: 80
  44. selector:
  45. app: nginx
  46. ---
  47. apiVersion: extensions/v1beta1
  48. kind: Ingress
  49. metadata:
  50. name: nginx-ingress
  51. annotations:
  52. kubernetes.io/ingress.class: "nginx"
  53. # cert-manager.io/issuer: "letest-issuer"
  54. spec:
  55. tls:
  56. - hosts:
  57. - "*.infoklinika.ru"
  58. secretName: wildcard-infoklinika-tls
  59. rules:
  60. - host: "*.infoklinika.ru"
  61. http:
  62. paths:
  63. - path: /
  64. backend:
  65. serviceName: nginx-svc
  66. servicePort: 80